Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
manifesto / tests / test_views.py
Size: Mime:
# -*- coding: utf-8 -*-
from django.test import TestCase


class ManifestViewTest(TestCase):
    urls = "manifesto.urls"

    def test_manifest_render(self):
        response = self.client.get('/manifest.appcache')
        self.assertEqual(response.status_code, 200)
        self.assertEqual(response['Content-Type'], 'text/cache-manifest')
        self.assertTemplateUsed(response, "manifesto/manifest.appcache")
        context = response.context
        self.assertEqual(len(context['revision']), 7)
        self.assertEqual(context['cache_list'], ['/static/js/application.js',
            '/static/css/screen.css'])
        self.assertEqual(context['network_list'], ['*'])
        self.assertEqual(context['fallback_list'], [('/', '/offline.html')])