mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Update unit tests for auth.ldap
This commit is contained in:
parent
08e36d0c48
commit
94f8ee4a7b
1 changed files with 3 additions and 3 deletions
|
@ -67,7 +67,7 @@ class LDAPAuthTestCase(TestCase):
|
|||
'''
|
||||
self.opts['auth.ldap.freeipa'] = True
|
||||
with patch.dict(salt.auth.ldap.__opts__, self.opts):
|
||||
with patch('salt.auth.ldap.auth', return_value=Bind):
|
||||
with patch('salt.auth.ldap._bind', return_value=Bind):
|
||||
self.assertIn('saltusers', salt.auth.ldap.groups('saltuser', password='password'))
|
||||
|
||||
def test_groups(self):
|
||||
|
@ -75,7 +75,7 @@ class LDAPAuthTestCase(TestCase):
|
|||
test groups in ldap
|
||||
'''
|
||||
with patch.dict(salt.auth.ldap.__opts__, self.opts):
|
||||
with patch('salt.auth.ldap.auth', return_value=Bind):
|
||||
with patch('salt.auth.ldap._bind', return_value=Bind):
|
||||
self.assertIn('saltusers', salt.auth.ldap.groups('saltuser', password='password'))
|
||||
|
||||
def test_groups_activedirectory(self):
|
||||
|
@ -84,7 +84,7 @@ class LDAPAuthTestCase(TestCase):
|
|||
'''
|
||||
self.opts['auth.ldap.activedirectory'] = True
|
||||
with patch.dict(salt.auth.ldap.__opts__, self.opts):
|
||||
with patch('salt.auth.ldap.auth', return_value=Bind):
|
||||
with patch('salt.auth.ldap._bind', return_value=Bind):
|
||||
self.assertIn('saltusers', salt.auth.ldap.groups('saltuser', password='password'))
|
||||
|
||||
def test_auth_nopass(self):
|
||||
|
|
Loading…
Add table
Reference in a new issue