Пример #1
0
 def setUp(self):
     self.template = Template(
         '{% load solo_tags %}'
         '{% get_solo "tests.SiteConfiguration" as site_config  %}'
         '{{ site_config.site_name }}')
     self.cache = get_cache('default')
     self.cache_key = SiteConfiguration.get_cache_key()
     self.cache.clear()
     SiteConfiguration.objects.all().delete()
Пример #2
0
 def setUp(self):
     self.template = Template(
         '{% load solo_tags %}'
         '{% get_solo "tests.SiteConfiguration" as site_config  %}'
         '{{ site_config.site_name }}'
     )
     self.cache = get_cache('default')
     self.cache_key = SiteConfiguration.get_cache_key()
     self.cache.clear()
     SiteConfiguration.objects.all().delete()
Пример #3
0
 def test_cache_prefix_overriding(self):
     key = SiteConfiguration.get_cache_key()
     prefix = key.partition(':')[0]
     self.assertEqual(prefix, 'other')
Пример #4
0
 def test_cache_prefix_overriding(self):
     key = SiteConfiguration.get_cache_key()
     prefix = key.partition(':')[0]
     self.assertEqual(prefix, 'other')