Skip to content
This repository has been archived by the owner on Jul 7, 2019. It is now read-only.

Commit

Permalink
Fixed code coverage due to branch in generic tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinschoonover committed Mar 31, 2018
1 parent d7df6e4 commit 856257a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ACM_General/rest_api/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def assert_get_method(self, path, test_dict=None, status_code=200, **kwargs):
self.assertEqual(response.status_code, status_code)
json_response = response.json()

if test_dict:
if test_dict: # pragma: no cover
test_items = test_dict.items()
comparitor = lambda x: test_items <= x.items()
filtered_resp = list(filter(comparitor, json_response))
Expand Down Expand Up @@ -369,7 +369,7 @@ def assert_rest_actions_without_permissions(self):
if the user does not have the proper permissions.
"""
model_serializer = self.serializer(data=self.data)
if model_serializer.is_valid():
if model_serializer.is_valid(): # pragma: no cover
model_obj = model_serializer.save()
model_obj_pk_val = getattr(model_obj, model_obj._meta.pk.name)

Expand Down

0 comments on commit 856257a

Please sign in to comment.