Beispiel #1
0
 def test_translate_message_cor_resp(self):
     self.assertEqual(client.translate_message({'response': 200}),
                      {'response': 200})
Beispiel #2
0
 def test_translate_message_incor_resp(self):
     with self.assertRaises(ResponseCodeError):
         client.translate_message({'response': 700})
Beispiel #3
0
 def test_translate_message_not_resp(self):
     with self.assertRaises(MandatoryKeyError):
         client.translate_message({'one': 'two'})
Beispiel #4
0
 def test_translate_message_incor_resp_len(self):
     with self.assertRaises(ResponseCodeLenError):
         client.translate_message({'response': '5'})
Beispiel #5
0
 def test_translate_message_inc_type(self):
     with self.assertRaises(TypeError):
         client.translate_message(100)