From 179da3ecd90bd33762343e74822040a4a6818d6e Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Fri, 7 Sep 2007 19:57:01 +0000 Subject: [PATCH] - merged the unit test for the column_prefix fix that was established in the 0.3 trunk in r2795. the actual "fix" part of it I just happened to spot manually the other day and fixed without testing (forgot what the original failure condition was) in r3449. --- test/orm/mapper.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/test/orm/mapper.py b/test/orm/mapper.py index f00c1c59d0..ce5db508a7 100644 --- a/test/orm/mapper.py +++ b/test/orm/mapper.py @@ -47,13 +47,18 @@ class MapperTest(MapperSuperTest): assert str(e) == "Invalid cascade option 'fake'" def testcolumnprefix(self): - mapper(User, users, column_prefix='_') + mapper(User, users, column_prefix='_', properties={ + 'user_name':synonym('_user_name') + }) + s = create_session() u = s.get(User, 7) assert u._user_name=='jack' assert u._user_id ==7 assert not hasattr(u, 'user_name') - + u2 = s.query(User).filter_by(user_name='jack').one() + assert u is u2 + def testrefresh(self): mapper(User, users, properties={'addresses':relation(mapper(Address, addresses), backref='user')}) s = create_session() -- 2.47.3