File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -44,20 +44,18 @@ def test_full_response(self):
4444 mock_func = Mock ()
4545 mock_response = Response (
4646 data = "it works" .encode (),
47- context = ResponseContext (
48- context = HttpResponseContext (headers = {"a" : "a header" , "b" : "b header" }, status = 200 )
49- ),
47+ context = ResponseContext (context = HttpResponseContext (headers = {"a" : "a header" }, status = 200 )),
5048 )
5149 mock_func .return_value = mock_response
5250
53- returnBody = json_format .MessageToJson (mock_response .to_grpc_trigger_response_context ())
51+ return_body = json_format .MessageToJson (mock_response .to_grpc_trigger_response_context ())
5452
5553 with patch ("nitric.faas.faas.construct_request" , Mock ()):
5654 handler = Handler (mock_func )
5755 response = handler ()
5856
5957 # Ensure the response is returned in the tuple format for Flask
60- assert response == (returnBody , 200 , {"Content-Type" : "application/json" })
58+ assert response == (return_body , 200 , {"Content-Type" : "application/json" })
6159
6260 def test_unhandled_exception (self ):
6361 # always return and error to test how it's handled internally
You can’t perform that action at this time.
0 commit comments