Update Python client.

Throw ApiException if fail to parse string to datetime.
This commit is contained in:
geekerzp
2015-06-30 18:38:11 +08:00
parent 80d1deb2dd
commit b99f006861
5 changed files with 61 additions and 81 deletions

View File

@@ -52,7 +52,7 @@ class ApiExceptionTests(unittest.TestCase):
except ApiException as e:
self.assertEqual(e.status, 404)
self.assertEqual(e.reason, "Not Found")
self.assertDictEqual(e.body, {'message': 'Pet not found', 'code': 1, 'type': 'error'})
self.assertRegexpMatches(e.body, "Pet not found")
def test_500_error(self):
self.pet_api.add_pet(body=self.pet)