Skip to content

Commit

Permalink
Add test for type_of function of db client
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasschaub committed Jul 6, 2021
1 parent 9450d8e commit 4252713
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions workers/tests/integrationtests/test_geodatabase.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,12 @@ def test_sanity_check_fid_field(self):
self.assertFalse(db_client.sanity_check_fid_field(self.dataset, "foo"))
self.assertTrue(db_client.sanity_check_fid_field(self.dataset, self.fid_field))

def test_type_of(self):
result = asyncio.run(db_client.type_of(self.dataset, self.fid_field))
self.assertEqual(result, "integer")
result = asyncio.run(db_client.type_of(self.dataset, "name"))
self.assertNotEqual(result, "integer")


if __name__ == "__main__":
unittest.main()

0 comments on commit 4252713

Please sign in to comment.