def test_return_foreign_table_create_query(self): mprows = _get_fake_partition(type_='str') query = _get_create_query(mprows, 'table1') self.assertIn('CREATE FOREIGN TABLE', query)
def test_converts_date_to_postgresql_type(self): mprows = _get_fake_partition(type_='date') query = _get_create_query(mprows, 'table1') self.assertIn('column1 DATE', query)
def test_converts_datetime_to_postgresql_type(self): mprows = _get_fake_partition(type_='datetime') query = _get_create_query(mprows, 'table1') self.assertIn('column1 TIMESTAMP WITHOUT TIME ZONE', query)
def test_converts_int_to_postgresql_type(self): mprows = _get_fake_partition(type_='int') query = _get_create_query(mprows, 'table1') self.assertIn('column1 INTEGER', query)
def test_converts_float_to_postgresql_type(self): mprows = _get_fake_partition(type_='float') query = _get_create_query(mprows, 'table1') self.assertIn('column1 NUMERIC', query)