From 42527135a6d8622b942d51009396d7385f518996 Mon Sep 17 00:00:00 2001 From: Matthias Schaub Date: Tue, 6 Jul 2021 15:31:40 +0200 Subject: [PATCH] Add test for type_of function of db client --- workers/tests/integrationtests/test_geodatabase.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/workers/tests/integrationtests/test_geodatabase.py b/workers/tests/integrationtests/test_geodatabase.py index d9344c5f0..d68115c4a 100644 --- a/workers/tests/integrationtests/test_geodatabase.py +++ b/workers/tests/integrationtests/test_geodatabase.py @@ -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()