예제 #1
0
 def test_doesnt_raise_on_unknown_attribute(self):
     safe_clear_cached_property(self.instance, "bar")
예제 #2
0
 def bust_cache(self):
     """Clear relevant caches for this instance."""
     safe_clear_cached_property(self, "is_nsfw")
     safe_clear_cached_property(self, "rendered")
예제 #3
0
 def test_clears_attribute(self):
     safe_clear_cached_property(self.instance, "foo")
     self.assertFalse(hasattr(self.instance, "foo"))