Skip to content

Commit

Permalink
tests: add basic tests for legal/static views
Browse files Browse the repository at this point in the history
  • Loading branch information
xavfernandez committed Dec 9, 2024
1 parent 72df9d4 commit a36df40
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/www/test_static_views.py
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&#39;Utilisation</h1>'),
],
)
def test_navigation_not_authenticated(client, view_name, expected_title):
response = client.get(reverse(view_name))
assertContains(response, expected_title)

0 comments on commit a36df40

Please sign in to comment.