-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: add basic tests for legal/static views
- Loading branch information
1 parent
72df9d4
commit a36df40
Showing
1 changed file
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import pytest | ||
from django.urls import reverse | ||
from pytest_django.asserts import assertContains | ||
|
||
|
||
@pytest.mark.parametrize( | ||
"view_name,expected_title", | ||
[ | ||
("accessibility", "<h1>Déclaration d'accessibilité</h1>"), | ||
("legal-notice", "<h1>Mentions légales</h1>"), | ||
("legal-privacy", "<h1>Politique de confidentialité</h1>"), | ||
("legal-terms", '<h1 id="conditions-générales-dutilisation">Conditions Générales d'Utilisation</h1>'), | ||
], | ||
) | ||
def test_navigation_not_authenticated(client, view_name, expected_title): | ||
response = client.get(reverse(view_name)) | ||
assertContains(response, expected_title) |