Example #1
0
 def tearDownClass(cls):
     clear_cache_manifest()
     News.objects.all().delete()
     User.objects.all().delete()
     if DJANGOCMS:
         from cms.models import Page
         Page.objects.all().delete()
     super(BaseDataTestCase, cls).tearDownClass()
Example #2
0
 def tearDownClass(cls):
     clear_cache_manifest()
     News.objects.all().delete()
     User.objects.all().delete()
     if DJANGOCMS:
         from cms.models import Page
         Page.objects.all().delete()
     super(BaseDataTestCase, cls).tearDownClass()
Example #3
0
 def test_command_view_equivalent(self):
     request = self.get_request("/", user=self.admin)
     view = ManifestAppCache.as_view(appcache_update=1)
     response = view(request)
     # version / date / comments removed as we're interested in
     # extracted urls. stripped for the same reason
     manifest_view = re.sub("# (date|version).+", "", response.content).strip()
     clear_cache_manifest()
     call_command("update_manifest")
     # version / date / comments removed as we're interested in
     # extracted urls. stripped for the same reason
     manifest_command = re.sub("# (date|version).+", "", get_cached_manifest()).strip()
     self.assertEqual(manifest_command, manifest_view)
Example #4
0
 def test_command_view_equivalent(self):
     request = self.get_request('/', user=self.admin)
     view = ManifestAppCache.as_view(appcache_update=1)
     response = view(request)
     # version / date / comments removed as we're interested in
     # extracted urls. stripped for the same reason
     manifest_view = re.sub("# (date|version).+", "",
                            response.content).strip()
     clear_cache_manifest()
     call_command("update_manifest")
     # version / date / comments removed as we're interested in
     # extracted urls. stripped for the same reason
     manifest_command = re.sub("# (date|version).+", "",
                               get_cached_manifest()).strip()
     self.assertEqual(manifest_command, manifest_view)
Example #5
0
 def handle(self, *args, **options):
     clear_cache_manifest()
 def setUp(self):
     clear_cache_manifest()
Example #7
0
 def get_urls(self):
     clear_cache_manifest()
     appcache_registry.extract_urls()
     appcache_registry.get_manifest(update=True)
Example #8
0
 def setUp(self):
     clear_cache_manifest()