Skip to content
This repository has been archived by the owner on Feb 24, 2023. It is now read-only.

Commit

Permalink
check for attribute 'model_class' for compatibility ydaniv#29
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke Scott committed Oct 4, 2017
1 parent b79f507 commit 6ace69b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rest_assured/testcases.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ def get_lookup_from_response(self, data):
return data.get(self.response_lookup_field)

def get_model(self):
return self.model_class or self.object.__class__
return self.model_class if hasattr(self, 'model_class') else self.object.__class__

def test_create(self, data=None, **kwargs):
"""Send request to the create view endpoint, verify and return the response.
Expand Down

0 comments on commit 6ace69b

Please sign in to comment.