From: Paul Johnston Date: Fri, 17 Aug 2007 18:08:28 +0000 (+0000) Subject: Avoid textual SQL in unit tests, so MSSQL has a chance to use 'identity insert' mode X-Git-Tag: rel_0_3_11~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3959a1ae3ffc8bc4e573ad373ac074fbaf6a07fc;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git Avoid textual SQL in unit tests, so MSSQL has a chance to use 'identity insert' mode --- diff --git a/test/orm/eagertest3.py b/test/orm/eagertest3.py index 8e77358124..d9acabc621 100644 --- a/test/orm/eagertest3.py +++ b/test/orm/eagertest3.py @@ -456,10 +456,10 @@ class EagerTest6(testbase.ORMTest): ) def setUp(self): - testbase.db.execute("INSERT INTO prj (title) values('project 1');") - testbase.db.execute("INSERT INTO task_status (id) values(1);") - testbase.db.execute("INSERT INTO task_type(id) values(1);") - testbase.db.execute("INSERT INTO task (title, task_type_id, status_id, prj_id) values('task 1',1,1,1);") + testbase.db.execute(project_t.insert(), {'title':'project 1'}) + testbase.db.execute(task_status_t.insert(), {'id':1}) + testbase.db.execute(task_type_t.insert(), {'id':1}) + testbase.db.execute(task_t.insert(), {'title':'task 1', 'task_type_id':1, 'status_id':1, 'prj_id':1}) def test_nested_joins(self): # this is testing some subtle column resolution stuff,