diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2017-05-29 12:46:14 +0200 |
---|---|---|
committer | Lukas Slebodnik <lslebodn@redhat.com> | 2017-05-29 13:10:21 +0200 |
commit | 5d9df623e1999864fd2873d8784a5182558f4a1f (patch) | |
tree | 97e5b3e71160cb851a35eac9720484c5b633c40a | |
parent | 89726be5a05493b7af312f0be9ac5ecb6f1822e1 (diff) | |
download | sssd-5d9df623e1999864fd2873d8784a5182558f4a1f.tar.gz sssd-5d9df623e1999864fd2873d8784a5182558f4a1f.tar.xz sssd-5d9df623e1999864fd2873d8784a5182558f4a1f.zip |
TESTS: Fix pep8 errors in test_kcm.py
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
-rw-r--r-- | src/tests/intg/test_kcm.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/tests/intg/test_kcm.py b/src/tests/intg/test_kcm.py index 80873f6e4..ae49eca80 100644 --- a/src/tests/intg/test_kcm.py +++ b/src/tests/intg/test_kcm.py @@ -30,6 +30,7 @@ import config from util import unindent from test_secrets import create_sssd_secrets_fixture + class KcmTestEnv(object): def __init__(self, k5kdc, k5util): self.k5kdc = k5kdc @@ -149,10 +150,12 @@ def setup_for_kcm_mem(request, kdc_instance): sssd_conf = create_sssd_conf(kcm_path, "memory") return common_setup_for_kcm_mem(request, kdc_instance, kcm_path, sssd_conf) + @pytest.fixture def setup_secrets(request): create_sssd_secrets_fixture(request) + @pytest.fixture def setup_for_kcm_sec(request, kdc_instance): """ @@ -286,7 +289,7 @@ def collection_init_list_destroy(testenv): # in the collection as the default. And sine the KCM back ends don't # guarantee if they are FIFO or LIFO, just check for either alice or bob assert testenv.k5util.default_principal() in \ - ['alice@KCMTEST', 'bob@KCMTEST'] + ['alice@KCMTEST', 'bob@KCMTEST'] cc_coll = testenv.k5util.list_all_princs() assert len(cc_coll) == 2 assert cc_coll['alice@KCMTEST'] == ['krbtgt/KCMTEST@KCMTEST'] @@ -440,6 +443,7 @@ def test_kcm_sec_kdestroy_nocache(setup_for_kcm_sec, testenv = setup_for_kcm_sec exercise_subsidiaries(testenv) + def test_kcm_sec_parallel_klist(setup_for_kcm_sec, setup_secrets): """ @@ -452,9 +456,8 @@ def test_kcm_sec_parallel_klist(setup_for_kcm_sec, out, _, _ = testenv.k5util.kinit("alice", "alicepw") assert out == 0 - processes = [] - for i in range(0,10): + for i in range(0, 10): p = testenv.k5util.spawn_in_env(['klist', '-A']) processes.append(p) |