Beispiel #1
0
 def test_format(self):
     seq = Sequence('my_seq_no_schema')
     dialect = postgresql.PGDialect()
     assert dialect.identifier_preparer.format_sequence(seq) \
         == 'my_seq_no_schema'
     seq = Sequence('my_seq', schema='some_schema')
     assert dialect.identifier_preparer.format_sequence(seq) \
         == 'some_schema.my_seq'
     seq = Sequence('My_Seq', schema='Some_Schema')
     assert dialect.identifier_preparer.format_sequence(seq) \
         == '"Some_Schema"."My_Seq"'
Beispiel #2
0
 def test_instancelevel(self):
     dialect = postgresql.PGDialect()
     dialect.ischema_names = dialect.ischema_names.copy()
     dialect.ischema_names['my_custom_type'] = self.CustomType
     self._assert_reflected(dialect)
Beispiel #3
0
 def test_clslevel(self):
     postgresql.PGDialect.ischema_names['my_custom_type'] = self.CustomType
     dialect = postgresql.PGDialect()
     self._assert_reflected(dialect)