mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2024-12-24 18:22:24 +00:00
Fix basic search tests
Signed-off-by: Emmy D'Anello <emmy.danello@animath.fr>
This commit is contained in:
parent
121e1da37d
commit
5d13d9bc16
@ -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"])
|
||||
|
Loading…
Reference in New Issue
Block a user