Fixed up test_headers so it passes. Old config variable name updated, and a bunch of standard headers that no longer exist removed.

issue-47
Marnanel Thurman 2020-10-27 15:57:49 +00:00
rodzic e8037ce402
commit baabe28692
1 zmienionych plików z 3 dodań i 9 usunięć

Wyświetl plik

@ -9,6 +9,7 @@ logger = logging.getLogger(name="kepi")
from django.test import TestCase, Client
from kepi.trilby_api.tests import create_local_person
from kepi.bowler_pub.utils import uri_to_url
from django.conf import settings
from unittest import skip
@ -20,10 +21,9 @@ class TestHeaders(TestCase):
settings.KEPI['LOCAL_OBJECT_HOSTNAME'] = 'testserver'
self.alice = create_local_person('alice')
self.client = Client()
self.alice_url = settings.KEPI['USER_URL_FORMAT'] % {
self.alice_url = uri_to_url(settings.KEPI['USER_LINK'] % {
'username': 'alice',
'hostname': settings.KEPI['LOCAL_OBJECT_HOSTNAME'],
}
})
def test_link(self):
@ -55,12 +55,6 @@ class TestHeaders(TestCase):
for field, value in [
('X-Content-Type-Options', 'nosniff'),
('X-XSS-Protection', '1; mode=block'),
('Vary', 'Accept, Accept-Encoding, Origin'),
('Cache-Control', 'max-age=180, public'),
('Transfer-Encoding', 'chunked'),
('Strict-Transport-Security', 'max-age=31536000; includeSubDomains; preload'),
('Referrer-Policy', 'no-referrer-when-downgrade'),
('X-Frame-Options', 'DENY'),
]: