aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--okupy/tests/unit/test_ldapuser.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/okupy/tests/unit/test_ldapuser.py b/okupy/tests/unit/test_ldapuser.py
index 85097aa..7dd2b5f 100644
--- a/okupy/tests/unit/test_ldapuser.py
+++ b/okupy/tests/unit/test_ldapuser.py
@@ -95,7 +95,8 @@ class LDAPUserUnitTests(TestCase):
self.assertRaises(ldap.INVALID_CREDENTIALS, get_bound_ldapuser,
request, 'test')
db_alias = 'ldap_%s' % request.session.cache_key
- self.assertNotIn(db_alias, settings.DATABASES)
+ self.assertNotIn('USER', settings.DATABASES.get(db_alias, {}))
+ self.assertNotIn('PASSWORD', settings.DATABASES.get(db_alias, {}))
def test_get_bound_ldapuser_context_manager_cleans_up_settings(self):
secondary_password = Random.get_random_bytes(48)
@@ -109,4 +110,5 @@ class LDAPUserUnitTests(TestCase):
with get_bound_ldapuser(request) as user: # noqa
pass
db_alias = 'ldap_%s' % request.session.cache_key
- self.assertNotIn(db_alias, settings.DATABASES)
+ self.assertNotIn('USER', settings.DATABASES.get(db_alias, {}))
+ self.assertNotIn('PASSWORD', settings.DATABASES.get(db_alias, {}))