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