Merge pull request #24743 from edx/ziafazal/e2e-tests-devstack

[BD-18] Disable django debug toolbar when running e2e tests
This commit is contained in:
Zia Fazal
2020-08-12 09:51:47 +05:00
committed by GitHub
2 changed files with 4 additions and 2 deletions

View File

@@ -108,7 +108,8 @@ DEBUG_TOOLBAR_CONFIG = {
def should_show_debug_toolbar(request):
# We always want the toolbar on devstack unless running tests from another Docker container
if request.get_host().startswith('edx.devstack.studio:'):
hostname = request.get_host()
if hostname.startswith('edx.devstack.studio:') or hostname.startswith('studio.devstack.edx:'):
return False
return True

View File

@@ -105,7 +105,8 @@ DEBUG_TOOLBAR_CONFIG = {
def should_show_debug_toolbar(request):
# We always want the toolbar on devstack unless running tests from another Docker container
if request.get_host().startswith('edx.devstack.lms:'):
hostname = request.get_host()
if hostname.startswith('edx.devstack.lms:') or hostname.startswith('lms.devstack.edx:'):
return False
return True