Commit 0782e41c authored by Tres Seaver's avatar Tres Seaver

Remove other pointless tests of Python's instance attr semantics.

parent 3bad42ba
......@@ -409,42 +409,18 @@ class ObjectManagerTests(PlacelessSetup, unittest.TestCase):
si1 = SimpleItem('1')
om['1'] = si1
self.failUnless(('1', si1) in om.items())
# A contained item overwrites the method
self.failUnless(hasattr(om.items, 'im_func'))
om.__dict__['items'] = si1
self.failUnless(aq_base(om.items) is si1)
self.failUnless(aq_base(om['items']) is si1)
# Once the object is gone, the method is back
del om['items']
self.failUnless(hasattr(om.items, 'im_func'))
def test_keys(self):
om = self._makeOne()
si1 = SimpleItem('1')
om['1'] = si1
self.failUnless('1' in om.keys())
# A contained item overwrites the method
self.failUnless(hasattr(om.keys, 'im_func'))
om.__dict__['keys'] = si1
self.failUnless(aq_base(om.keys) is si1)
self.failUnless(aq_base(om['keys']) is si1)
# Once the object is gone, the method is back
del om['keys']
self.failUnless(hasattr(om.keys, 'im_func'))
def test_values(self):
om = self._makeOne()
si1 = SimpleItem('1')
om['1'] = si1
self.failUnless(si1 in om.values())
# A contained item overwrites the method
self.failUnless(hasattr(om.values, 'im_func'))
om.__dict__['values'] = si1
self.failUnless(aq_base(om.values) is si1)
self.failUnless(aq_base(om['values']) is si1)
# Once the object is gone, the method is back
del om['values']
self.failUnless(hasattr(om.values, 'im_func'))
def test_list_imports(self):
om = self._makeOne()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment