def category(): cg = Category(name=fauxfactory.gen_alpha(8).lower(), description=fauxfactory.gen_alphanumeric(length=32), display_name=fauxfactory.gen_alphanumeric(length=32)) cg.create() yield cg cg.delete()
def category(): cg = Category(name=fauxfactory.gen_alpha(8).lower(), description=fauxfactory.gen_alphanumeric(length=32), display_name=fauxfactory.gen_alphanumeric(length=32)) cg.create() yield cg cg.delete()
def test_category_crud(): cg = Category(name=fauxfactory.gen_alphanumeric(8).lower(), description=fauxfactory.gen_alphanumeric(32), display_name=fauxfactory.gen_alphanumeric(32)) cg.create() with update(cg): cg.description = fauxfactory.gen_alphanumeric(32) cg.delete(cancel=False)
def category(): """ Returns random created category object Object can be used in all test run session """ cg = Category(name=fauxfactory.gen_alpha(8).lower(), description=fauxfactory.gen_alphanumeric(length=32), display_name=fauxfactory.gen_alphanumeric(length=32)) cg.create() yield cg cg.delete(False)
def category(): """ Returns random created category object Object can be used in all test run session """ cg = Category(name=fauxfactory.gen_alpha(8).lower(), description=fauxfactory.gen_alphanumeric(length=32), display_name=fauxfactory.gen_alphanumeric(length=32)) cg.create() yield cg cg.delete(False)
def category(): """ Returns random created category object Object can be used in all test run session """ if BZ(1517285, forced_streams='5.9').blocks: display_name = 'test-{}'.format(fauxfactory.gen_alphanumeric(length=27)) # display_name should be with max length of 32 else: display_name = fauxfactory.gen_alphanumeric(length=32) cg = Category(name=fauxfactory.gen_alpha(8).lower(), description=fauxfactory.gen_alphanumeric(length=32), display_name=display_name) cg.create() yield cg cg.delete(False)
def category(): """ Returns random created category object Object can be used in all test run session """ if BZ(1517285, forced_streams='5.9').blocks: display_name = 'test-{}'.format( fauxfactory.gen_alphanumeric(length=27)) # display_name should be with max length of 32 else: display_name = fauxfactory.gen_alphanumeric(length=32) cg = Category(name=fauxfactory.gen_alpha(8).lower(), description=fauxfactory.gen_alphanumeric(length=32), display_name=display_name) cg.create() yield cg cg.delete(False)