diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2007-04-20 00:43:56 +0000 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2007-04-20 00:43:56 +0000 |
commit | eaad320a8556c94355ca16ca5a388dca1f3b2878 (patch) | |
tree | 49d10f21a406f1420b460186caf14a8a266e0b16 /test/engine/execute.py | |
parent | 0fe6b80c7024e6f9430071f162274fbbd0e3ca44 (diff) | |
download | sqlalchemy-eaad320a8556c94355ca16ca5a388dca1f3b2878.tar.gz |
- some docstrings
- some more test scenarios for raw bind params
Diffstat (limited to 'test/engine/execute.py')
-rw-r--r-- | test/engine/execute.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/test/engine/execute.py b/test/engine/execute.py index 480158580..af29fb2a5 100644 --- a/test/engine/execute.py +++ b/test/engine/execute.py @@ -45,7 +45,7 @@ class ExecuteTest(testbase.PersistTest): assert res.fetchall() == [(1, "jack"), (2, "ed"), (3, "horse"), (4, 'sally'), (5, None)] conn.execute("delete from users") - @testbase.supported('postgres') + @testbase.supported('postgres', 'mysql') def test_raw_python(self): for conn in (testbase.db, testbase.db.connect()): conn.execute("insert into users (user_id, user_name) values (%(id)s, %(name)s)", {'id':1, 'name':'jack'}) @@ -54,6 +54,16 @@ class ExecuteTest(testbase.PersistTest): res = conn.execute("select * from users") assert res.fetchall() == [(1, "jack"), (2, "ed"), (3, "horse"), (4, 'sally')] conn.execute("delete from users") + + @testbase.supported('sqlite') + def test_raw_named(self): + for conn in (testbase.db, testbase.db.connect()): + conn.execute("insert into users (user_id, user_name) values (:id, :name)", {'id':1, 'name':'jack'}) + conn.execute("insert into users (user_id, user_name) values (:id, :name)", {'id':2, 'name':'ed'}, {'id':3, 'name':'horse'}) + conn.execute("insert into users (user_id, user_name) values (:id, :name)", id=4, name='sally') + res = conn.execute("select * from users") + assert res.fetchall() == [(1, "jack"), (2, "ed"), (3, "horse"), (4, 'sally')] + conn.execute("delete from users") if __name__ == "__main__": testbase.main() |