diff --git a/demo/config.py b/demo/config.py index 1e06cd3..93ff815 100644 --- a/demo/config.py +++ b/demo/config.py @@ -43,6 +43,6 @@ oidc_params = dict( cookie_crypt=getenv('OIDC_COOKIE_CRYPT', None), private_key_file=getenv('OIDC_SERVICE_USER_PRIVATE_KEY_FILE', '.private-key.json'), organization_id=getenv('OIDC_ORGANIZATION_ID', '12346'), - project_id=getenv('OIDC_PROJECT_ID', '12347'), + project_id=getenv('OIDC_PROJECT_ID', None), ) diff --git a/scopes/tests/config.py b/scopes/tests/config.py index 72bbba5..bfcd7ee 100644 --- a/scopes/tests/config.py +++ b/scopes/tests/config.py @@ -11,14 +11,6 @@ log_level = logging.INFO log_format = '%(asctime)s %(levelname)s %(name)s %(message)s' log_dateformat = '%Y-%m-%dT%H:%M:%S' -def setup_logging(): - hdlr = logging.getLogger().handlers[-1] - logging.getLogger().removeHandler(hdlr) # remove NullHandler added by testrunner - logging.basicConfig(filename=log_file, level=log_level, - format=log_format, datefmt=log_dateformat) - -setup_logging() - # server / app settings server_port = '8999' base_url = 'testing:' diff --git a/scopes/tests/test_postgres.py b/scopes/tests/test_postgres.py index 67eac01..59fd47c 100644 --- a/scopes/tests/test_postgres.py +++ b/scopes/tests/test_postgres.py @@ -8,8 +8,11 @@ sys.path = [os.path.dirname(__file__)] + sys.path import unittest from scopes.tests import tlib_storage +from scopes.tests.util import setup_logging from scopes.storage.db.postgres import StorageFactory import config +setup_logging(config) + config.dbengine = 'postgresql+psycopg' config.dbname = 'testdb' config.dbuser = 'testuser' diff --git a/scopes/tests/test_standard.py b/scopes/tests/test_standard.py index 6562ecd..0cf26d4 100644 --- a/scopes/tests/test_standard.py +++ b/scopes/tests/test_standard.py @@ -8,8 +8,11 @@ sys.path = [os.path.dirname(__file__)] + sys.path import unittest from scopes.tests import tlib_web, tlib_storage +from scopes.tests.util import setup_logging from scopes.storage.common import StorageFactory import config +setup_logging(config) + config.dbengine = 'sqlite' config.dbname = 'var/test.db' config.dbschema = None diff --git a/scopes/tests/util.py b/scopes/tests/util.py new file mode 100644 index 0000000..deac102 --- /dev/null +++ b/scopes/tests/util.py @@ -0,0 +1,11 @@ +# scopes.tests.util + +import logging + +def setup_logging(config): + hdlr = logging.getLogger().handlers[-1] + logging.getLogger().removeHandler(hdlr) # remove NullHandler added by testrunner + logging.basicConfig(filename=config.log_file, level=config.log_level, + format=config.log_format, datefmt=config.log_dateformat) + +