Ticket #993: patch-993.diff
| File patch-993.diff, 1.2 kB (added by konrads, 1 year ago) |
|---|
-
test/test_reprs.py
old new 9 9 from axiom.attributes import integer, text, reference 10 10 from axiom.item import Item 11 11 from axiom.store import Store 12 13 12 from twisted.trial.unittest import TestCase 14 13 15 14 class ReprTesterItemClass(Item): … … 107 106 R = repr(i1) 108 107 self.assertIn("reference(unstored@%d)" % (id(i2),), R) 109 108 110 109 def test_itemWithNoStoreReps(self): 110 """ 111 Verify, that items that are instantiated without a C{axiom.store.Store) 112 __repr__ correctly 113 """ 114 import re 115 class Y(Item): 116 y = text() 117 118 self.assertTrue(re.match('^Y\(y=None, storeID=None\)',Y().__repr__())) -
attributes.py
old new 420 420 return self 421 421 422 422 pyval = getattr(oself, self.underlying, _NEEDS_FETCH) 423 st = getattr(oself, 'store')424 423 if pyval is _NEEDS_FETCH: 425 424 dbval = getattr(oself, self.dbunderlying, _NEEDS_FETCH) 426 425 if dbval is _NEEDS_FETCH:
