Skip to content

Commit 8054e95

Browse files
committed
Fix auth test util.
1 parent 595c275 commit 8054e95

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/utils.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ def server_started_with_auth(client):
8888
# MongoDB >= 2.6
8989
if 'security' in parsed:
9090
security = parsed['security']
91+
# >= rc3
92+
if 'authorization' in security:
93+
return security['authorization'] == 'enabled'
94+
# < rc3
9195
return security.get('auth', False) or bool(security.get('keyFile'))
9296
return parsed.get('auth', False) or bool(parsed.get('keyFile'))
9397
# Legacy

0 commit comments

Comments
 (0)