Add test for listing carriers and assert that at least one carrier has a code equal to "gls".
- Add test for listing carriers - Assert that at least one carrier has a code equal to "gls"
This commit is contained in:
parent
f53c41c99f
commit
fbb1a9d46c
1 changed files with 4 additions and 0 deletions
4
test.py
4
test.py
|
@ -34,5 +34,9 @@ class TestKeyDelivery(TestCase):
|
|||
response = self.keydelivery.realtime("gls", "483432314669")
|
||||
self.assertEqual(response["code"], 200)
|
||||
|
||||
def test_list_carriers(self):
|
||||
response = self.keydelivery.list_carriers()
|
||||
self.assertTrue(any([carrier["code"] == "gls" for carrier in response["data"]]))
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
Loading…
Reference in a new issue