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