diff options
Diffstat (limited to 'test/dialect/postgres.py')
-rw-r--r-- | test/dialect/postgres.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/dialect/postgres.py b/test/dialect/postgres.py index 06cebaf17..bae1f666d 100644 --- a/test/dialect/postgres.py +++ b/test/dialect/postgres.py @@ -5,6 +5,18 @@ from sqlalchemy import exceptions from sqlalchemy.databases import postgres from testlib import * +class SequenceTest(SQLCompileTest): + def test_basic(self): + seq = Sequence("my_seq_no_schema") + dialect = postgres.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"' + class InsertTest(AssertMixin): @testing.supported('postgres') def setUpAll(self): |