From 5d13d9bc1690e49baaecf7c052c2239d03ce4634 Mon Sep 17 00:00:00 2001 From: Emmy D'Anello Date: Sat, 13 Jan 2024 19:24:55 +0100 Subject: [PATCH] Fix basic search tests Signed-off-by: Emmy D'Anello --- registration/tests.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/registration/tests.py b/registration/tests.py index 3faa472..ef53c23 100644 --- a/registration/tests.py +++ b/registration/tests.py @@ -413,16 +413,18 @@ class TestRegistration(TestCase): """ Try to search some things. """ - response = self.client.get(reverse("haystack_search") + "?q=" + self.user.last_name) + + response = self.client.get(reverse("haystack_search") + "?q=" + self.user.email + "&models=auth.user") self.assertEqual(response.status_code, 200) self.assertTrue(response.context["object_list"]) response = self.client.get(reverse("haystack_search") + "?q=" + - str(self.coach.registration.professional_activity)) + str(self.coach.registration.professional_activity) + + "&models=registration.CoachRegistration") self.assertEqual(response.status_code, 200) self.assertTrue(response.context["object_list"]) response = self.client.get(reverse("haystack_search") + "?q=" + - self.student.registration.school) + self.student.registration.school + "&models=registration.StudentRegistration") self.assertEqual(response.status_code, 200) self.assertTrue(response.context["object_list"])