Fix filtering

This commit is contained in:
TehomCD 2020-03-01 10:02:23 -05:00
parent c83567c95e
commit ec570a17cd
2 changed files with 7 additions and 1 deletions

View file

@ -19,6 +19,7 @@ urlpatterns = [
)
class TestEvenniaRESTApi(EvenniaTest):
client_class = APIClient
maxDiff = None
def setUp(self):
super().setUp()
@ -96,6 +97,7 @@ class TestEvenniaRESTApi(EvenniaTest):
with self.subTest(msg=f"Testing {view.view_name} "):
view_url = reverse(f"api:{view.view_name}")
response = self.client.get(view_url)
self.assertEqual(response.status_code, 200)
self.assertCountEqual(response.data['results'], [view.serializer(obj).data for obj in view.list])
def test_create(self):