diff options
Diffstat (limited to 'test/orm/test_bind.py')
| -rw-r--r-- | test/orm/test_bind.py | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/test/orm/test_bind.py b/test/orm/test_bind.py index aa41ad554..e1cd8fdd8 100644 --- a/test/orm/test_bind.py +++ b/test/orm/test_bind.py @@ -448,7 +448,7 @@ class BindIntegrationTest(_fixtures.FixtureTest): self.mapper_registry.map_imperatively(User, users) with testing.db.connect() as c: - sess = Session(bind=c, autocommit=False) + sess = Session(bind=c) u = User(name="u1") sess.add(u) sess.flush() @@ -458,7 +458,7 @@ class BindIntegrationTest(_fixtures.FixtureTest): c.exec_driver_sql("select count(1) from users").scalar() == 0 ) - sess = Session(bind=c, autocommit=False) + sess = Session(bind=c) u = User(name="u2") sess.add(u) sess.flush() @@ -474,19 +474,6 @@ class BindIntegrationTest(_fixtures.FixtureTest): c.exec_driver_sql("select count(1) from users").scalar() == 0 ) - with testing.db.connect() as c: - trans = c.begin() - sess = Session(bind=c, autocommit=True) - u = User(name="u3") - sess.add(u) - sess.flush() - assert c.in_transaction() - trans.commit() - assert not c.in_transaction() - assert ( - c.exec_driver_sql("select count(1) from users").scalar() == 1 - ) - class SessionBindTest(fixtures.MappedTest): @classmethod |
