With SECURE_HSTS_SECONDS=3600, the middleware adds "Strict-Transport-Security: max-age=3600" to the response.
(self)
| 44 | |
| 45 | @override_settings(SECURE_HSTS_SECONDS=3600) |
| 46 | def test_sts_on(self): |
| 47 | """ |
| 48 | With SECURE_HSTS_SECONDS=3600, the middleware adds |
| 49 | "Strict-Transport-Security: max-age=3600" to the response. |
| 50 | """ |
| 51 | self.assertEqual( |
| 52 | self.process_response(secure=True).headers["Strict-Transport-Security"], |
| 53 | "max-age=3600", |
| 54 | ) |
| 55 | |
| 56 | @override_settings(SECURE_HSTS_SECONDS=3600) |
| 57 | def test_sts_already_present(self): |
nothing calls this directly
no test coverage detected