Fix test to accept both orderings of the cache-control header

This commit is contained in:
Matt Westcott 2019-12-18 15:59:26 +00:00
parent 4a1b337461
commit c72a4e0941

View file

@ -67,7 +67,7 @@ class TestServeView(TestCase):
self.assertEqual(self.get()['ETag'], '"123456"')
def test_has_cache_control_header(self):
self.assertEqual(self.get()['Cache-Control'], 'max-age=3600, public')
self.assertIn(self.get()['Cache-Control'], ['max-age=3600, public', 'public, max-age=3600'])
def clear_sendfile_cache(self):
from wagtail.utils.sendfile import _get_sendfile