From 26fd8f6f68fea8afbdee8c5bba823ae4b26a1711 Mon Sep 17 00:00:00 2001 From: Max Erenberg Date: Thu, 19 Aug 2021 17:22:34 +0000 Subject: [PATCH] remove duplicate function definition --- tests/conftest.py | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 2c56b67..8944d88 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -235,20 +235,6 @@ def mocks_for_create_user(): yield -@pytest.fixture(scope='session') -def mocks_for_create_user(): - with patch.object(utils, 'gen_password') as gen_password_mock, \ - patch.object(pwd, 'getpwuid') as getpwuid_mock, \ - patch.object(grp, 'getgrgid') as getgrgid_mock: - gen_password_mock.return_value = 'krb5' - # Normally, if getpwuid or getgrgid do *not* raise a KeyError, - # then LDAPService will skip that UID. Therefore, by raising a - # KeyError, we are making sure that the UID will *not* be skipped. - getpwuid_mock.side_effect = KeyError() - getgrgid_mock.side_effect = KeyError() - yield - - @pytest.fixture def simple_user(): return User(