Exemplo n.º 1
0
 def test_malformed_request(self):
     res = formatter.malformed_request(self.request, self.err)
     assert res.startswith("Malformed request")
Exemplo n.º 2
0
 def test_accepted_valid_request(self):
     res = formatter.accepted_valid_request(self.req_id, self.request)
     assert res.startswith("Accepted valid request")
Exemplo n.º 3
0
 def test_invalid_response(self):
     res = formatter.invalid_response(self.req_id, self.err)
     assert res.startswith("Invalid response")
Exemplo n.º 4
0
 def test_error_calling_back(self):
     res = formatter.error_calling_back(self.service_name,
                                        self.callback_url, self.err)
     assert res.startswith("Error while posting result to callback URL")
Exemplo n.º 5
0
 def test_new_worker_thread(self):
     res = formatter.new_worker_thread(self.req_id)
     assert res.startswith("Initiating new worker thread")
Exemplo n.º 6
0
 def test_policy_service_error(self):
     res = formatter.policy_service_error(self.url, self.req_id, self.err)
     assert res.startswith("Unable to call policy")
Exemplo n.º 7
0
 def test_requesting(self):
     res = formatter.requesting(self.service_name, self.req_id)
     assert res.startswith("Making a call to service")
Exemplo n.º 8
0
 def test_error_local_env(self):
     res = formatter.error_local_env(self.req_id, self.desc, self.err)
     assert res.startswith(
         "Error while creating local environment for request ID")
Exemplo n.º 9
0
 def test_error_response_posting(self):
     res = formatter.error_response_posting(self.req_id, self.desc,
                                            self.err)
     assert res.startswith(
         "Error while posting a response for a request ID")
Exemplo n.º 10
0
 def test_error_while_processing(self):
     res = formatter.error_while_processing(self.req_id, self.desc,
                                            self.err)
     assert res.startswith("Error while processing request ID")
Exemplo n.º 11
0
 def test_creating_local_env(self):
     res = formatter.creating_local_env(self.req_id)
     assert res.startswith("Creating local environment request ID")
Exemplo n.º 12
0
 def test_processed(self):
     res = formatter.processed(self.req_id, self.desc)
     assert res.startswith("Processed request ID")
Exemplo n.º 13
0
 def test_inside_new_thread(self):
     res = formatter.inside_new_thread(self.req_id)
     assert res.startswith("Spinning up a new thread for request ID")
Exemplo n.º 14
0
 def test_inside_worker_thread(self):
     res = formatter.inside_worker_thread(self.req_id)
     assert res.startswith("Inside worker thread for request ID")
Exemplo n.º 15
0
 def test_malformed_response(self):
     res = formatter.malformed_response(self.response, self.client,
                                        self.err)
     assert res.startswith("Malformed response")
Exemplo n.º 16
0
 def test_received_http_response(self):
     res = formatter.received_http_response(self.response)
     assert res.startswith("Received response [code: ")
Exemplo n.º 17
0
 def test_need_policies(self):
     res = formatter.need_policies(self.req_id)
     assert res.startswith("Policies required but")
Exemplo n.º 18
0
 def test_listening_response(self):
     res = formatter.listening_response(self.req_id, self.desc)
     assert res.startswith("Response is sent for request ID")
Exemplo n.º 19
0
 def test_requesting_url(self):
     res = formatter.requesting_url(self.url, self.req_id)
     assert res.startswith("Making a call to URL")
Exemplo n.º 20
0
 def test_items_received(self):
     res = formatter.items_received(10, "messages")
     assert res == "Received 10 messages"
Exemplo n.º 21
0
 def test_error_requesting(self):
     res = formatter.error_requesting(self.service_name, self.req_id,
                                      self.err)
     assert res.startswith("Error while requesting service")
Exemplo n.º 22
0
 def test_items_sent(self):
     res = formatter.items_sent(10, "messages")
     assert res == "Published 10 messages"
Exemplo n.º 23
0
 def test_calling_back_with_body(self):
     res = formatter.calling_back_with_body(self.req_id, self.callback_url,
                                            self.body)
     assert res.startswith("Posting result to callback URL")
Exemplo n.º 24
0
 def test_received_request(self):
     res = formatter.received_request(self.url, self.remote_addr,
                                      self.json_body)
     assert res.startswith("Received a call")