def test_unregistering_nonexistant_ruleset_doesnt_error(self): from z3c.caching.registry import unregister, lookup self.failUnless(lookup(TestView) is None) unregister(TestView) self.failUnless(lookup(TestView) is None)
def test_unregistering_ruleset_removes_ruleset(self): from z3c.caching.registry import register, unregister, lookup register(TestView, "frop") unregister(TestView) self.failUnless(lookup(TestView) is None)
def test_unregister(self): from z3c.caching.registry import unregister with self.assertRaises(LookupError): unregister(TestView)
def test_unregistering_nonexistant_ruleset_doesnt_error(self): from z3c.caching.registry import unregister, lookup self.assertIsNone(lookup(TestView)) unregister(TestView) self.assertIsNone(lookup(TestView))