Meer testen locaties & quantities
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -36,11 +36,28 @@ class ddOperApiTest(unittest.TestCase):
|
|||||||
self.assertEqual(type(locations), ddOperApi.ddOperLocation)
|
self.assertEqual(type(locations), ddOperApi.ddOperLocation)
|
||||||
self.assertTrue(len(locations.data) > 0)
|
self.assertTrue(len(locations.data) > 0)
|
||||||
self.assertEqual(type(locations.data[0]["properties"]["locationName"]), str)
|
self.assertEqual(type(locations.data[0]["properties"]["locationName"]), str)
|
||||||
|
|
||||||
|
def test_locationNames(self):
|
||||||
|
names = self.client.locations().locationNames()
|
||||||
|
self.assertEqual(type(names), type({}.keys()))
|
||||||
|
self.assertTrue(len(names) > 0)
|
||||||
|
for n in names:
|
||||||
|
self.assertEqual(type(n), str)
|
||||||
|
|
||||||
|
def test_locationDetail(self):
|
||||||
|
locations = self.client.locations()
|
||||||
|
name = locations.data[0]["properties"]["locationName"]
|
||||||
|
detail = locations.locationDetail(name)
|
||||||
|
self.assertEqual(type(detail), dict)
|
||||||
|
self.assertEqual(detail["properties"]["locationName"], name)
|
||||||
|
|
||||||
def test_quantities(self):
|
def test_quantities(self):
|
||||||
quantities = self.client.quantities()
|
quantities = self.client.quantities()
|
||||||
self.assertEqual(type(quantities), ddOperApi.ddOperQuantitie)
|
self.assertEqual(type(quantities), ddOperApi.ddOperQuantitie)
|
||||||
self.assertTrue(len(quantities.data) > 0)
|
self.assertTrue(len(quantities.data) > 0)
|
||||||
self.assertEqual(type(quantities.data[0]), str)
|
self.assertEqual(type(quantities.data[0]), str)
|
||||||
|
for q in quantities.quantities():
|
||||||
|
self.assertEqual(type(q), str)
|
||||||
|
|
||||||
def test_values(self):
|
def test_values(self):
|
||||||
values = self.client.values("test1", "null")
|
values = self.client.values("test1", "null")
|
||||||
|
Reference in New Issue
Block a user