def test_link_interpolate_args_identity(schema, session): class C(object): def identity(self): return "my-app" link = Service(schema, session).app.delete assert link.interpolate_args([C()]) == 'https://api.heroku.com/apps/my-app'
def test_link_interpolate_args_too_few(schema, session): link = Service(schema, session).app.delete with pytest.raises(TypeError): link.interpolate_args([])
def test_link_interpolate_args(schema, session): link = Service(schema, session).app.delete assert link.interpolate_args(['my-app']) == 'https://api.heroku.com/apps/my-app'
def test_link_interpolate_args_too_many(schema, session): link = Service(schema, session).app.delete with pytest.raises(TypeError): link.interpolate_args(['foo', 'bar'])