Пример #1
0
 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)
Пример #2
0
 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)
Пример #3
0
 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)
Пример #4
0
 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)
Пример #5
0
 def test_unregister(self):
     from z3c.caching.registry import unregister
     with self.assertRaises(LookupError):
         unregister(TestView)
Пример #6
0
 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))