def test_clone(self): api = Namespace('test') parent = api.model('Parent', {}) api.clone('Child', parent, {}) assert 'Child' in api.models assert 'Parent' in api.models
def test_clone_with_multiple_parents(self): api = Namespace('test') grand_parent = api.model('GrandParent', {}) parent = api.model('Parent', {}) api.clone('Child', grand_parent, parent, {}) assert 'Child' in api.models assert 'Parent' in api.models assert 'GrandParent' in api.models