def test_adoptee_search_doesnt_fail_on_followup(self): """ Search endpoint paginates correctly """ ContentGeneration.generate_test_content(number_of_adoptees=settings.REST_FRAMEWORK['PAGE_SIZE'] + 1) response = self.c.get(reverse(self.adoptee_search_url_name, args=['M'])) json_response = json.JSONDecoder().decode(response.content.decode('utf-8')) next_url = json_response['next'] response = self.c.get(next_url) self.assertEqual(response.status_code, 200)
def handle(self, *args, **options): ContentGeneration.generate_test_content()