From 106e97f5df198ea2ac21cb59e4a4f5cd6add3e35 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Tue, 11 Aug 2020 01:07:45 +0200 Subject: [PATCH] Tests are better when they work (fix two tests) --- apps/wei/tests/test_wei_registration.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/wei/tests/test_wei_registration.py b/apps/wei/tests/test_wei_registration.py index 2ff0bbf1..c055baeb 100644 --- a/apps/wei/tests/test_wei_registration.py +++ b/apps/wei/tests/test_wei_registration.py @@ -307,7 +307,7 @@ class TestWEIRegistration(TestCase): roles=[], )) self.assertEqual(response.status_code, 200) - self.assertFalse(response.context["form"].is_valid()) + self.assertFalse(response.context["membership_form"].is_valid()) response = self.client.post(reverse("wei:wei_register_2A", kwargs=dict(wei_pk=self.wei.pk)), dict( user=user.id, @@ -490,7 +490,7 @@ class TestWEIRegistration(TestCase): # Check that if the WEI is started, we can't update a registration self.wei.date_start = '2000-01-01' self.wei.save() - response = self.client.get(reverse("wei:wei_update_registration", kwargs=dict(wei_pk=self.registration.pk))) + response = self.client.get(reverse("wei:validate_registration", kwargs=dict(pk=self.registration.pk))) self.assertRedirects(response, reverse("wei:wei_closed", kwargs=dict(pk=self.wei.pk)), 302, 200) def test_delete_registration(self):