Пример #1
0
 def test_returns_from_cache_after_first_import(self, mocked_method):
     settings.reset_caches()
     settings.get_module('VALID_MODULE')
     settings.get_module('VALID_MODULE')
     settings.get_module('VALID_MODULE')
     self.assertEqual(mocked_method.call_count, 1)
Пример #2
0
 def test_returns_from_cache_after_first_import(self, mocked_method):
     settings.reset_caches()
     settings.get_object('VALID_OBJECT')
     settings.get_object('VALID_OBJECT')
     settings.get_object('VALID_OBJECT')
     self.assertEqual(mocked_method.call_count, 1)