mirror of
https://github.com/ansible/awx.git
synced 2026-05-12 03:47:36 -02:30
Fix auth-related errors breaking unit tests.
This commit is contained in:
@@ -39,6 +39,7 @@ class TokenAuthentication(authentication.TokenAuthentication):
|
|||||||
if token:
|
if token:
|
||||||
token = urllib.unquote(token).strip('"')
|
token = urllib.unquote(token).strip('"')
|
||||||
return 'token %s' % token
|
return 'token %s' % token
|
||||||
|
return ''
|
||||||
|
|
||||||
def authenticate(self, request):
|
def authenticate(self, request):
|
||||||
self.request = request
|
self.request = request
|
||||||
|
|||||||
@@ -76,11 +76,8 @@ include(optional('/etc/tower/conf.d/*.py'), scope=locals())
|
|||||||
# default settings for development. If not present, we can still run using
|
# default settings for development. If not present, we can still run using
|
||||||
# only the defaults.
|
# only the defaults.
|
||||||
try:
|
try:
|
||||||
include(
|
include(optional('local_*.py'), scope=locals())
|
||||||
optional('local_*.py'),
|
include('postprocess.py', scope=locals())
|
||||||
'postprocess.py',
|
|
||||||
scope=locals(),
|
|
||||||
)
|
|
||||||
except ImportError:
|
except ImportError:
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|||||||
@@ -108,12 +108,8 @@ settings_file = os.environ.get('AWX_SETTINGS_FILE',
|
|||||||
# Attempt to load settings from /etc/tower/settings.py first, followed by
|
# Attempt to load settings from /etc/tower/settings.py first, followed by
|
||||||
# /etc/tower/conf.d/*.py.
|
# /etc/tower/conf.d/*.py.
|
||||||
try:
|
try:
|
||||||
include(
|
include(settings_file, optional(settings_files), scope=locals())
|
||||||
settings_file,
|
include('postprocess.py', scope=locals())
|
||||||
optional(settings_files),
|
|
||||||
'postprocess.py',
|
|
||||||
scope=locals(),
|
|
||||||
)
|
|
||||||
except ImportError:
|
except ImportError:
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|||||||
Reference in New Issue
Block a user