Skip to content

Commit

Permalink
chore: Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
danilofuchs committed Nov 4, 2024
1 parent 4596a9d commit 17480f8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions singer-connectors/target-postgres/tests/unit/test_db_sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ def test_column_type_mapping(self):
json_str_or_null = {"type": ["string", "null"] }
json_dt = {"type": ["string"] , "format": "date-time"}
json_dt_or_null = {"type": ["string", "null"] , "format": "date-time"}
json_date = {"type": ["string"] , "format": "date"}
json_date_or_null = {"type": ["string", "null"] , "format": "date"}
json_t = {"type": ["string"] , "format": "time"}
json_t_or_null = {"type": ["string", "null"] , "format": "time"}
json_num = {"type": ["number"] }
Expand All @@ -75,6 +77,8 @@ def test_column_type_mapping(self):
self.assertEqual(mapper(json_str_or_null) , 'character varying')
self.assertEqual(mapper(json_dt) , 'timestamp without time zone')
self.assertEqual(mapper(json_dt_or_null) , 'timestamp without time zone')
self.assertEqual(mapper(json_date) , 'date')
self.assertEqual(mapper(json_date_or_null) , 'date')
self.assertEqual(mapper(json_t) , 'time without time zone')
self.assertEqual(mapper(json_t_or_null) , 'time without time zone')
self.assertEqual(mapper(json_num) , 'double precision')
Expand Down

0 comments on commit 17480f8

Please sign in to comment.