test: fix search test

This commit is contained in:
moanos [he/him] 2024-11-22 11:56:11 +01:00
parent b4f52c7876
commit dc3859d589

View File

@ -120,7 +120,7 @@ class SearchTest(TestCase):
self.assertNotContains(response, "TestAdoption2") self.assertNotContains(response, "TestAdoption2")
def test_plz_search(self): def test_plz_search(self):
response = self.client.post(reverse('search'), {"max_distance": 100, "location": "Berlin"}) response = self.client.post(reverse('search'), {"max_distance": 100, "location": "Berlin", "sex": "A"})
self.assertEqual(response.status_code, 200) self.assertEqual(response.status_code, 200)
self.assertContains(response, "TestAdoption1") self.assertContains(response, "TestAdoption1")
self.assertNotContains(response, "TestAdoption3") self.assertNotContains(response, "TestAdoption3")