Commits

Mike Bayer committed 45a5b6f

more session updates

  • Participants
  • Parent commits 0356220

Comments (0)

Files changed (2)

File test/dialect/mssql.py

 
         sess = create_session(bind=testing.db)
         for i in range(100):
-            sess.save(Foo(bar=i, range=i%10))
+            sess.add(Foo(bar=i, range=i%10))
         sess.flush()
 
     def tearDownAll(self):

File test/dialect/postgres.py

         foo = Foo()
         foo.id = 1
         foo.intarr = [1,2,3]
-        sess.save(foo)
+        sess.add(foo)
         sess.flush()
-        sess.clear()
+        sess.expunge_all()
         foo = sess.query(Foo).get(1)
         self.assertEquals(foo.intarr, [1,2,3])
 
         foo.intarr.append(4)
         sess.flush()
-        sess.clear()
+        sess.expunge_all()
         foo = sess.query(Foo).get(1)
         self.assertEquals(foo.intarr, [1,2,3,4])
 
         foo.intarr = []
         sess.flush()
-        sess.clear()
+        sess.expunge_all()
         self.assertEquals(foo.intarr, [])
 
         foo.intarr = None
         sess.flush()
-        sess.clear()
+        sess.expunge_all()
         self.assertEquals(foo.intarr, None)
 
         # Errors in r4217:
         foo = Foo()
         foo.id = 2
-        sess.save(foo)
+        sess.add(foo)
         sess.flush()
 
 class TimeStampTest(TestBase, AssertsExecutionResults):