diff --git a/cms/envs/acceptance.py b/cms/envs/acceptance.py index da015be00e..fa59fc9ad1 100644 --- a/cms/envs/acceptance.py +++ b/cms/envs/acceptance.py @@ -19,12 +19,21 @@ import logging logging.basicConfig(filename=TEST_ROOT / "log" / "cms_acceptance.log", level=logging.ERROR) import os -from random import choice, randint def seed(): return os.getppid() +# Suppress error message "Cannot determine primary key of logged in user" +# from track.middleware that gets triggered when using an auto_auth workflow +# This is an ERROR level warning so we need to set the threshold at CRITICAL +logging.getLogger('track.middleware').setLevel(logging.CRITICAL) + +# Suppress warning message "Cannot find corresponding link for name: " +# from edxmako.shortcuts. We have no appropriate pages in the platform to +# use, so these are not set up for TOS and PRIVACY +logging.getLogger('edxmako.shortcuts').setLevel(logging.ERROR) + DOC_STORE_CONFIG = { 'host': 'localhost', 'db': 'acceptance_xmodule', diff --git a/lms/envs/acceptance.py b/lms/envs/acceptance.py index 8582ced3e1..3a8eff9edb 100644 --- a/lms/envs/acceptance.py +++ b/lms/envs/acceptance.py @@ -27,6 +27,11 @@ import string def seed(): return os.getppid() +# Suppress error message "Cannot determine primary key of logged in user" +# from track.middleware that gets triggered when using an auto_auth workflow +# This is an ERROR level warning so we need to set the threshold at CRITICAL +logging.getLogger('track.middleware').setLevel(logging.CRITICAL) + # Use the mongo store for acceptance tests DOC_STORE_CONFIG = { 'host': 'localhost',