mirror of
https://github.com/barkeser2002/offline-db.git
synced 2026-09-25 09:26:12 +03:00
Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
13 lines
519 B
Python
13 lines
519 B
Python
from django.test import TestCase, Client
|
|
|
|
class SecurityHeadersMiddlewareTest(TestCase):
|
|
def setUp(self):
|
|
self.client = Client()
|
|
|
|
def test_security_headers_present(self):
|
|
response = self.client.get('/', secure=True)
|
|
self.assertIn('Referrer-Policy', response)
|
|
self.assertEqual(response['Referrer-Policy'], 'strict-origin-when-cross-origin')
|
|
self.assertIn('Permissions-Policy', response)
|
|
self.assertEqual(response['Permissions-Policy'], 'camera=(), microphone=()')
|