From 05e7cf9e2ad5485bce417c6a79dc7f82756fb21d Mon Sep 17 00:00:00 2001 From: Jason Kirtland Date: Fri, 29 Jun 2007 18:33:59 +0000 Subject: [PATCH] Simplifying that pickle workaround. --- test/orm/attributes.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/test/orm/attributes.py b/test/orm/attributes.py index 70e786bc1d..7cb29fb673 100644 --- a/test/orm/attributes.py +++ b/test/orm/attributes.py @@ -67,13 +67,10 @@ class AttributesTest(PersistTest): o2_mt2_str = [ k for k in o2.__dict__ if k == 'mt2'][0] self.assert_(o_mt2_str == o2_mt2_str) self.assert_(o_mt2_str is not o2_mt2_str) - # take current mt2 from o2 + # change the id of o2.__dict__['mt2'] former = o2.__dict__['mt2'] del o2.__dict__['mt2'] - for k in o.__dict__: - if k == 'mt2': - # set it back with the id-equal key from o, - o2.__dict__[k] = former + o2.__dict__[o_mt2_str] = former pk_o2 = pickle.dumps(o2) -- 2.47.3