update authentication class in postprocess and add unit test

This commit is contained in:
Wayne Witzel III
2016-09-23 08:22:26 -04:00
parent 6ab70a2f60
commit 1268c8e205
2 changed files with 12 additions and 1 deletions

View File

@@ -0,0 +1,11 @@
from split_settings.tools import include
def test_postprocess_auth_basic_enabled():
locals().update({'__file__': __file__})
include('../../../settings/defaults.py', scope=locals())
assert 'awx.api.authentication.LoggedBasicAuthentication' in locals()['REST_FRAMEWORK']['DEFAULT_AUTHENTICATION_CLASSES']
locals().update({'AUTH_BASIC_ENABLED': False})
include('../../../settings/postprocess.py', scope=locals())
assert 'awx.api.authentication.LoggedBasicAuthentication' not in locals()['REST_FRAMEWORK']['DEFAULT_AUTHENTICATION_CLASSES']