def test_no_version(self): del self.response.headers['Concent-Golem-Messages-Version'] with self.assertRaises(exceptions.ConcentVersionMismatchError): client.verify_response(self.response)
def test_version_mismatch(self): self.response.headers['Concent-Golem-Messages-Version'] = 'dummy' with self.assertRaises(exceptions.ConcentVersionMismatchError): client.verify_response(self.response)
def test_message_server_299(self): self.response.status_code = 299 client.verify_response(self.response)
def test_message_server_300(self): self.response.status_code = 300 with self.assertRaises(exceptions.ConcentRequestError): client.verify_response(self.response)
def test_message_server_error(self): self.response.status_code = 500 with self.assertRaises(exceptions.ConcentServiceError): client.verify_response(self.response)