def test_isplaybook(): for obj in ('foo', {}, {'foo': 'bar'}, True, False, None): assert isplaybook(obj) is False, obj for obj in (['foo'], []): assert isplaybook(obj) is True, obj
def test_isplaybook(playbook): assert isplaybook(playbook) is True
def test_isplaybook_invalid(playbook): assert isplaybook(playbook) is False