Some fixtures need to have a 'function' scope

This commit is contained in:
Shane Lee 2024-04-11 13:58:16 -06:00 committed by Pedro Algarvio
parent 6a86f354a4
commit 872a462c85

View file

@ -19,7 +19,7 @@ def group(modules):
# Create group name strings for tests
@pytest.fixture(scope="module")
@pytest.fixture(scope="function")
def non_existing_group_name(group):
group_name = random_string("group-", lowercase=False)
try:
@ -31,7 +31,7 @@ def non_existing_group_name(group):
group.delete(group_name)
@pytest.fixture(scope="module")
@pytest.fixture(scope="function")
def existing_group_name(group):
group_name = random_string("group-", lowercase=False)
try:
@ -46,7 +46,7 @@ def existing_group_name(group):
group.delete(group_name)
@pytest.fixture(scope="module")
@pytest.fixture(scope="function")
def non_existing_user(group):
group_name = random_string("user-", lowercase=False)
try:
@ -58,7 +58,7 @@ def non_existing_user(group):
group.delete(group_name)
@pytest.fixture(scope="module")
@pytest.fixture(scope="function")
def existing_user(group, existing_group_name):
group_name = random_string("user-", lowercase=False)
try:
@ -78,7 +78,7 @@ def rep_user_group():
yield random_string("RS-", lowercase=False)
@pytest.fixture(scope="module")
@pytest.fixture(scope="function")
def non_existing_group_member(group):
group_name = random_string("user-", lowercase=False)
try: