diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2007-08-02 01:18:42 +0000 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2007-08-02 01:18:42 +0000 |
| commit | 11b294d1d2114ecf51453697e87f9c7ce8fedc38 (patch) | |
| tree | 8b4bebcd37285eb1f4f56eed99b80c2c99448c96 /test | |
| parent | 23140c926be37eba0c0e3eecfb885b54ca2e41c5 (diff) | |
| download | sqlalchemy-11b294d1d2114ecf51453697e87f9c7ce8fedc38.tar.gz | |
- used a metaclass trick to get Session.bind / Session.<someprop> to work
Diffstat (limited to 'test')
| -rw-r--r-- | test/orm/unitofwork.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/orm/unitofwork.py b/test/orm/unitofwork.py index a3e025586..a3ee0654e 100644 --- a/test/orm/unitofwork.py +++ b/test/orm/unitofwork.py @@ -750,7 +750,7 @@ class OneToManyTest(UnitOfWorkTest): Session.commit() Session.delete(u) Session.commit() - self.assert_(a.address_id is not None and a.user_id is None and not Session().identity_map.has_key(u._instance_key) and Session().identity_map.has_key(a._instance_key)) + self.assert_(a.address_id is not None and a.user_id is None and not Session.identity_map.has_key(u._instance_key) and Session.identity_map.has_key(a._instance_key)) def testonetoone(self): m = mapper(User, users, properties = dict( @@ -867,7 +867,7 @@ class SaveTest(UnitOfWorkTest): # change first users name and save Session.update(u) u.user_name = 'modifiedname' - assert u in Session().dirty + assert u in Session.dirty Session.commit() # select both |
