Skip to content

Commit

Permalink
remove user to prevent ForeignKeyViolation
Browse files Browse the repository at this point in the history
  • Loading branch information
amolpati30 committed Nov 29, 2024
1 parent 721cafe commit 114ce65
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/foreman/api/test_ansible.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@


@pytest.fixture
def filtered_user(target_sat, module_org, module_location):
def filtered_user(request, target_sat, module_org, module_location):
"""
:steps:
1. Create a role with a host view filtered
Expand All @@ -48,7 +48,7 @@ def filtered_user(target_sat, module_org, module_location):
user = target_sat.api.User(
role=[role], password=password, location=[module_location], organization=[module_org]
).create()

request.addfinalizer(user.delete)
return user, password


Expand Down

0 comments on commit 114ce65

Please sign in to comment.