Fix a reverse url resolution on the BDS home page

This commit is contained in:
Martin Pépin 2021-02-07 16:30:02 +01:00
parent 7081380058
commit 7c35357060
No known key found for this signature in database
GPG key ID: E7520278B1774448
2 changed files with 11 additions and 1 deletions

View file

@ -34,7 +34,7 @@
<br> <br>
<br> <br>
<a class=button href="{% url 'export.members' %}">Télécharger la liste des membres (CSV)</a> <a class=button href="{% url 'bds:export.members' %}">Télécharger la liste des membres (CSV)</a>
<br> <br>
<br> <br>

View file

@ -22,6 +22,16 @@ def login_url(next=None):
return "{}?next={}".format(login_url, next) return "{}?next={}".format(login_url, next)
class TestHomeView(TestCase):
@mock.patch("gestioncof.signals.messages")
def test_get(self, mock_messages):
user = User.objects.create_user(username="random_user")
give_bds_buro_permissions(user)
self.client.force_login(user)
resp = self.client.get(reverse("bds:home"))
self.assertEquals(resp.status_code, 200)
class TestRegistrationView(TestCase): class TestRegistrationView(TestCase):
@mock.patch("gestioncof.signals.messages") @mock.patch("gestioncof.signals.messages")
def test_get_autocomplete(self, mock_messages): def test_get_autocomplete(self, mock_messages):