URL: https://github.com/freeipa/freeipa/pull/5281
Author: frozencemetery
 Title: #5281: Fix scope on pytest fixture in krbtpolicy tests
Action: opened

PR body:
"""
0d67180f7d2d0c6b5856db7061c44521f6a13c23 introduced the with_admin
fixture using class scope, which caused test failures as pytest
instantiated it before the multihost fixture.

Resolves: https://pagure.io/freeipa/issue/8950

Signed-off-by: Robbie Harwood <rharw...@redhat.com>
"""

To pull the PR as Git branch:
git remote add ghfreeipa https://github.com/freeipa/freeipa
git fetch ghfreeipa pull/5281/head:pr5281
git checkout pr5281
From 864a3b7b386cd2330172d0c76034e0bc3326f5d5 Mon Sep 17 00:00:00 2001
From: Robbie Harwood <rharw...@redhat.com>
Date: Thu, 19 Nov 2020 12:06:21 -0500
Subject: [PATCH] Fix scope on pytest fixture in krbtpolicy tests

0d67180f7d2d0c6b5856db7061c44521f6a13c23 introduced the with_admin
fixture using class scope, which caused test failures as pytest
instantiated it before the multihost fixture.

Resolves: https://pagure.io/freeipa/issue/8950

Signed-off-by: Robbie Harwood <rharw...@redhat.com>
---
 ipatests/test_integration/test_krbtpolicy.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ipatests/test_integration/test_krbtpolicy.py b/ipatests/test_integration/test_krbtpolicy.py
index e43c8d122b1..f70414a9a38 100644
--- a/ipatests/test_integration/test_krbtpolicy.py
+++ b/ipatests/test_integration/test_krbtpolicy.py
@@ -67,7 +67,7 @@ def install(cls, mh):
         tasks.create_active_user(cls.master, USER1, PASSWORD)
         tasks.create_active_user(cls.master, USER2, PASSWORD)
 
-    @pytest.fixture(autouse=True, scope="class")
+    @pytest.fixture(autouse=True, scope="function")
     def with_admin(self):
         tasks.kinit_admin(self.master)
         yield
_______________________________________________
FreeIPA-devel mailing list -- freeipa-devel@lists.fedorahosted.org
To unsubscribe send an email to freeipa-devel-le...@lists.fedorahosted.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedorahosted.org/archives/list/freeipa-devel@lists.fedorahosted.org

Reply via email to