def domain(request): if version.current_version() < "5.3": return None domain = Domain(name=fauxfactory.gen_alphanumeric(), enabled=True) domain.create() request.addfinalizer(lambda: domain.delete() if domain.exists() else None) return domain
def domain(request): if current_version < "5.3": return None domain = Domain(name=fauxfactory.gen_alphanumeric(), enabled=True) domain.create() request.addfinalizer(lambda: domain.delete() if domain.exists() else None) return domain
def domain(request): domain = Domain(name=fauxfactory.gen_alphanumeric(), enabled=True) domain.create() yield domain if domain.exists(): domain.delete()
def domain(request): domain = Domain(name=fauxfactory.gen_alphanumeric(), enabled=True) domain.create() request.addfinalizer(lambda: domain.delete() if domain.exists() else None) return domain
def copy_domain(request): domain = Domain(name=fauxfactory.gen_alphanumeric(), enabled=True) domain.create() request.addfinalizer(lambda: domain.delete() if domain.exists() else None) return domain
def copy_domain(request): domain = Domain(name="new_domain", enabled=True) domain.create() request.addfinalizer(lambda: domain.delete() if domain.exists() else None) return domain
def copy_domain(request): domain = Domain(name=generate_random_string(), enabled=True) domain.create() request.addfinalizer(lambda: domain.delete() if domain.exists() else None) return domain