def test_list(self): """ Verify the endpoint returns a list of all program types. """ ProgramTypeFactory.create_batch(4) expected = ProgramType.objects.all() with self.assertNumQueries(6): response = self.client.get(self.list_path) assert response.status_code == 200 assert response.data['results'] == self.serialize_program_type(expected, many=True)
def test_list(self): """ Verify the endpoint returns a list of all program_types. """ ProgramTypeFactory.create_batch(3) expected = ProgramType.objects.all() self.assert_list_results(self.list_path, expected, 4)
def test_list(self): """ Verify the endpoint returns a list of all program_types. """ ProgramTypeFactory.create_batch(3) expected = ProgramType.objects.all() self.assert_list_results(self.list_path, expected, 4)