whitenoise.django.DjangoWhiteNoise.max_age

Here are the examples of the python api whitenoise.django.DjangoWhiteNoise.max_age taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Examples 7

Example 1

Project: whitenoise Source File: test_django_whitenoise.py
    def test_unversioned_file_not_cached_forever(self):
        url = settings.STATIC_URL + self.static_files.css_path
        response = self.server.get(url)
        self.assertEqual(response.content, self.static_files.css_content)
        self.assertEqual(response.headers.get('Cache-Control'),
                         'public, max-age={}'.format(DjangoWhiteNoise.max_age))