def test_parseLegacyMultiFailure(self):
     response = {'body': 'ERR: 301, Some Failure\nOK:12345'}
     transport = Transport()
     result = transport.parseLegacy(response)
     self.assertTrue(len(result) == 2)
     self.assertTrue(result[0]['code'] == '301')
     self.assertTrue(result[1]['OK'] == '12345')
Example #2
0
 def test_parseLegacyMultiFailure(self):
     response = {'body': 'ERR: 301, Some Failure\nOK:12345'}
     transport = Transport()
     result = transport.parseLegacy(response)
     self.assertTrue(len(result) == 2)
     self.assertTrue(result[0]['code'] == '301')
     self.assertTrue(result[1]['OK'] == '12345')
 def test_parseLegacyFailure(self):
     response = {'body': 'ERR: Some exception'}
     transport = Transport()
     self.assertRaises(ClickatellError, lambda: transport.parseLegacy(response))
 def test_parseLegacy(self):
     response = {'body': 'OK: 1234 Test: 12345'}
     transport = Transport()
     result = transport.parseLegacy(response)
     self.assertTrue(result['OK'] == '1234')
     self.assertTrue(result['Test'] == '12345')
Example #5
0
 def test_parseLegacyFailure(self):
     response = {'body': 'ERR: Some exception'}
     transport = Transport()
     self.assertRaises(ClickatellError,
                       lambda: transport.parseLegacy(response))
Example #6
0
 def test_parseLegacy(self):
     response = {'body': 'OK: 1234 Test: 12345'}
     transport = Transport()
     result = transport.parseLegacy(response)
     self.assertTrue(result['OK'] == '1234')
     self.assertTrue(result['Test'] == '12345')