remove duplicate function definition

This commit is contained in:
Max Erenberg 2021-08-19 17:22:34 +00:00
parent 2a286579cb
commit 26fd8f6f68
1 changed files with 0 additions and 14 deletions

View File

@ -235,20 +235,6 @@ def mocks_for_create_user():
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()
def simple_user():
return User(