def tag(category): tag = Tag(name=fauxfactory.gen_alpha(8).lower(), display_name=fauxfactory.gen_alphanumeric(length=32), category=category) tag.create() yield tag tag.delete()
def test_tag_crud(category): tag = Tag(name=fauxfactory.gen_alphanumeric(8).lower(), display_name=fauxfactory.gen_alphanumeric(32), category=category) tag.create() with update(tag): tag.display_name = fauxfactory.gen_alphanumeric(32) tag.delete(cancel=False)
def tag(category): """ Returns random created tag object Object can be used in all test run session """ tag = Tag(name=fauxfactory.gen_alpha(8).lower(), display_name=fauxfactory.gen_alphanumeric(length=32), category=category) tag.create() yield tag tag.delete(False)