summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/testing/suite
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sqlalchemy/testing/suite')
-rw-r--r--lib/sqlalchemy/testing/suite/test_insert.py8
-rw-r--r--lib/sqlalchemy/testing/suite/test_sequence.py10
2 files changed, 11 insertions, 7 deletions
diff --git a/lib/sqlalchemy/testing/suite/test_insert.py b/lib/sqlalchemy/testing/suite/test_insert.py
index 92e38ab20..65741941f 100644
--- a/lib/sqlalchemy/testing/suite/test_insert.py
+++ b/lib/sqlalchemy/testing/suite/test_insert.py
@@ -41,7 +41,9 @@ class LastrowidTest(fixtures.TablesTest):
def _assert_round_trip(self, table, conn):
row = conn.execute(table.select()).first()
- eq_(row, (conn.engine.dialect.default_sequence_base, "some data"))
+ eq_(
+ row, (conn.dialect.default_sequence_base, "some data",),
+ )
def test_autoincrement_on_insert(self, connection):
@@ -282,7 +284,9 @@ class ReturningTest(fixtures.TablesTest):
def _assert_round_trip(self, table, conn):
row = conn.execute(table.select()).first()
- eq_(row, (conn.engine.dialect.default_sequence_base, "some data"))
+ eq_(
+ row, (conn.dialect.default_sequence_base, "some data",),
+ )
@classmethod
def define_tables(cls, metadata):
diff --git a/lib/sqlalchemy/testing/suite/test_sequence.py b/lib/sqlalchemy/testing/suite/test_sequence.py
index db5582c21..dda447c0d 100644
--- a/lib/sqlalchemy/testing/suite/test_sequence.py
+++ b/lib/sqlalchemy/testing/suite/test_sequence.py
@@ -23,7 +23,7 @@ class SequenceTest(fixtures.TablesTest):
Table(
"seq_pk",
metadata,
- Column("id", Integer, Sequence("tab_id_seq"), primary_key=True),
+ Column("id", Integer, Sequence("tab_id_seq"), primary_key=True,),
Column("data", String(50)),
)
@@ -33,7 +33,7 @@ class SequenceTest(fixtures.TablesTest):
Column(
"id",
Integer,
- Sequence("tab_id_seq", optional=True),
+ Sequence("tab_id_seq", data_type=Integer, optional=True),
primary_key=True,
),
Column("data", String(50)),
@@ -45,11 +45,11 @@ class SequenceTest(fixtures.TablesTest):
def test_insert_lastrowid(self, connection):
r = connection.execute(self.tables.seq_pk.insert(), data="some data")
- eq_(r.inserted_primary_key, [1])
+ eq_(r.inserted_primary_key, [testing.db.dialect.default_sequence_base])
def test_nextval_direct(self, connection):
r = connection.execute(self.tables.seq_pk.c.id.default)
- eq_(r, 1)
+ eq_(r, testing.db.dialect.default_sequence_base)
@requirements.sequences_optional
def test_optional_seq(self, connection):
@@ -60,7 +60,7 @@ class SequenceTest(fixtures.TablesTest):
def _assert_round_trip(self, table, conn):
row = conn.execute(table.select()).first()
- eq_(row, (1, "some data"))
+ eq_(row, (testing.db.dialect.default_sequence_base, "some data"))
class SequenceCompilerTest(testing.AssertsCompiledSQL, fixtures.TestBase):