Skip to content

Commit

Permalink
tests: add basic test for security.txt redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
xavfernandez committed Dec 9, 2024
1 parent a36df40 commit a83a58f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Empty file added tests/www/security/__init__.py
Empty file.
7 changes: 7 additions & 0 deletions tests/www/security/tests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from django.urls import reverse
from pytest_django.asserts import assertRedirects


def test_redirects(client):
response = client.get(reverse("security-txt"))
assertRedirects(response, "https://inclusion.gouv.fr/.well-known/security.txt", fetch_redirect_response=False)

0 comments on commit a83a58f

Please sign in to comment.