With SECURE_HSTS_SECONDS=0, the middleware does not add a "Strict-Transport-Security" header to the response.
(self)
| 77 | |
| 78 | @override_settings(SECURE_HSTS_SECONDS=0) |
| 79 | def test_sts_off(self): |
| 80 | """ |
| 81 | With SECURE_HSTS_SECONDS=0, the middleware does not add a |
| 82 | "Strict-Transport-Security" header to the response. |
| 83 | """ |
| 84 | self.assertNotIn( |
| 85 | "Strict-Transport-Security", |
| 86 | self.process_response(secure=True).headers, |
| 87 | ) |
| 88 | |
| 89 | @override_settings(SECURE_HSTS_SECONDS=600, SECURE_HSTS_INCLUDE_SUBDOMAINS=True) |
| 90 | def test_sts_include_subdomains(self): |
nothing calls this directly
no test coverage detected