summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/testing/suite/test_insert.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2013-02-06 15:49:32 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2013-02-06 15:49:32 -0500
commit2121c1690a17090a4027874751e90d02b4126fd2 (patch)
tree964a461f3d2ae21c6fcb3dd425d94e1274ee2776 /lib/sqlalchemy/testing/suite/test_insert.py
parent17790c9896e8ace4276b12b5f2cfcd366afae7e9 (diff)
downloadsqlalchemy-2121c1690a17090a4027874751e90d02b4126fd2.tar.gz
- add an "empty_inserts" requirement target plus a suite test
- add suite tests for basic explicit Sequence support, result-row column access (tests that name_normalize is set correctly among many other things)
Diffstat (limited to 'lib/sqlalchemy/testing/suite/test_insert.py')
-rw-r--r--lib/sqlalchemy/testing/suite/test_insert.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/sqlalchemy/testing/suite/test_insert.py b/lib/sqlalchemy/testing/suite/test_insert.py
index b2b2a0aa8..e3ef2b206 100644
--- a/lib/sqlalchemy/testing/suite/test_insert.py
+++ b/lib/sqlalchemy/testing/suite/test_insert.py
@@ -107,6 +107,24 @@ class InsertBehaviorTest(fixtures.TablesTest):
assert r.is_insert
assert not r.returns_rows
+ @requirements.empty_inserts
+ def test_empty_insert(self):
+ r = config.db.execute(
+ self.tables.autoinc_pk.insert(),
+ )
+ assert r.closed
+
+ r = config.db.execute(
+ self.tables.autoinc_pk.select()
+ )
+
+ eq_(
+ r.fetchall(),
+ [(1, None)]
+ )
+
+
+
class ReturningTest(fixtures.TablesTest):
run_deletes = 'each'