From 61e3704246cdd0d039dec3adfd723bd4a5bd5a6c Mon Sep 17 00:00:00 2001 From: Tasos Papaioannou Date: Wed, 22 May 2024 15:04:02 -0400 Subject: [PATCH] Fix host owner checking and test name typo. --- tests/foreman/api/test_host.py | 6 +++--- tests/foreman/cli/test_user.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/foreman/api/test_host.py b/tests/foreman/api/test_host.py index e8982215ad7..a7af2387aa5 100644 --- a/tests/foreman/api/test_host.py +++ b/tests/foreman/api/test_host.py @@ -144,7 +144,7 @@ def test_positive_update_owner_type( host.owner = owners[owner_type] host = host.update(['owner_type', 'owner']) assert host.owner_type == owner_type - assert host.owner.read() == owners[owner_type] + assert module_target_sat.api.User(id=host.owner.id).read() == owners[owner_type] @pytest.mark.tier1 @@ -468,13 +468,13 @@ def test_positive_create_and_update_with_user( host = module_target_sat.api.Host( owner=module_user, owner_type='User', organization=module_org, location=module_location ).create() - assert host.owner.read() == module_user + assert module_target_sat.api.User(id=host.owner.id).read() == module_user new_user = module_target_sat.api.User( organization=[module_org], location=[module_location] ).create() host.owner = new_user host = host.update(['owner']) - assert host.owner.read() == new_user + assert module_target_sat.api.User(id=host.owner.id).read() == new_user @pytest.mark.tier2 diff --git a/tests/foreman/cli/test_user.py b/tests/foreman/cli/test_user.py index 8b9c2b97147..977ece56b21 100644 --- a/tests/foreman/cli/test_user.py +++ b/tests/foreman/cli/test_user.py @@ -176,7 +176,7 @@ def test_positive_create_with_default_loc(self, target_sat): assert location['name'] == user['default-location'] @pytest.mark.tier1 - def test_positive_create_with_defaut_org(self, module_target_sat): + def test_positive_create_with_default_org(self, module_target_sat): """Check if user with default organization can be created :id: cc692b6f-2519-429b-8ecb-c4bb51ed3544