Skip to content
This repository has been archived by the owner on Sep 28, 2022. It is now read-only.

Commit

Permalink
Merge pull request #38 from postatum/94334404_code_cleanup2
Browse files Browse the repository at this point in the history
Renaming pt.2
  • Loading branch information
jstoiko committed May 15, 2015
2 parents 42e95ba + 574f043 commit 3b8c612
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion nefertari/view.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def convert_ids2objects(self):
for field in self._json_params.keys():
if not engine.is_relationship_field(field, self._model_class):
continue
model_cls = engine.relationship_cls(field, self._model_class)
model_cls = engine.get_relationship_cls(field, self._model_class)
self.id2obj(field, model_cls)

def get_debug(self, package=None):
Expand Down
4 changes: 2 additions & 2 deletions tests/test_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,8 @@ def test_convert_ids2objects_relational(self, run, id2obj, eng):
view._model_class = 'Model1'
eng.is_relationship_field.return_value = True
view.convert_ids2objects()
eng.relationship_cls.assert_called_once_with('foo', 'Model1')
id2obj.assert_called_once_with('foo', eng.relationship_cls())
eng.get_relationship_cls.assert_called_once_with('foo', 'Model1')
id2obj.assert_called_once_with('foo', eng.get_relationship_cls())

@patch('nefertari.view.BaseView._run_init_actions')
def test_get_debug(self, run):
Expand Down

0 comments on commit 3b8c612

Please sign in to comment.