@@ -115,6 +115,17 @@ def event_handler():
115115 assert response ["statusCode" ] == 200
116116 assert self .mock_received_requests ["/auth.test" ] == 1
117117
118+ event = {
119+ "body" : body ,
120+ "queryStringParameters" : {},
121+ "headers" : self .build_headers (timestamp , body ),
122+ "requestContext" : {"httpMethod" : "POST" },
123+ "isBase64Encoded" : False ,
124+ }
125+ response = SlackRequestHandler (app ).handle (event , self .context )
126+ assert response ["statusCode" ] == 200
127+ assert self .mock_received_requests ["/auth.test" ] == 1
128+
118129 @mock_lambda
119130 def test_shortcuts (self ):
120131 app = App (client = self .web_client , signing_secret = self .signing_secret ,)
@@ -151,6 +162,17 @@ def shortcut_handler(ack):
151162 assert response ["statusCode" ] == 200
152163 assert self .mock_received_requests ["/auth.test" ] == 1
153164
165+ event = {
166+ "body" : body ,
167+ "queryStringParameters" : {},
168+ "headers" : self .build_headers (timestamp , body ),
169+ "requestContext" : {"httpMethod" : "POST" },
170+ "isBase64Encoded" : False ,
171+ }
172+ response = SlackRequestHandler (app ).handle (event , self .context )
173+ assert response ["statusCode" ] == 200
174+ assert self .mock_received_requests ["/auth.test" ] == 1
175+
154176 @mock_lambda
155177 def test_commands (self ):
156178 app = App (client = self .web_client , signing_secret = self .signing_secret ,)
@@ -187,6 +209,17 @@ def command_handler(ack):
187209 assert response ["statusCode" ] == 200
188210 assert self .mock_received_requests ["/auth.test" ] == 1
189211
212+ event = {
213+ "body" : body ,
214+ "queryStringParameters" : {},
215+ "headers" : self .build_headers (timestamp , body ),
216+ "requestContext" : {"httpMethod" : "POST" },
217+ "isBase64Encoded" : False ,
218+ }
219+ response = SlackRequestHandler (app ).handle (event , self .context )
220+ assert response ["statusCode" ] == 200
221+ assert self .mock_received_requests ["/auth.test" ] == 1
222+
190223 @mock_lambda
191224 def test_lazy_listeners (self ):
192225 app = App (client = self .web_client , signing_secret = self .signing_secret ,)
@@ -251,3 +284,13 @@ def test_oauth(self):
251284 }
252285 response = SlackRequestHandler (app ).handle (event , self .context )
253286 assert response ["statusCode" ] == 302
287+
288+ event = {
289+ "body" : "" ,
290+ "queryStringParameters" : {},
291+ "headers" : {},
292+ "requestContext" : {"httpMethod" : "GET" },
293+ "isBase64Encoded" : False ,
294+ }
295+ response = SlackRequestHandler (app ).handle (event , self .context )
296+ assert response ["statusCode" ] == 302
0 commit comments