From 44eb9aa9ff5c2695813d699f65bd9f91911a28c9 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Sun, 17 Mar 2019 23:34:48 -0400 Subject: [PATCH] Create a blank config if none exists --- tests/conftest.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index 1320cfe4..f461ffc6 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -53,12 +53,14 @@ def travis(confdir): is_travis = os.environ.get('TRAVIS', False) if is_travis: # this directory is cached, see .travis.yaml - cache_dir = confdir or config.get_broker_conf_path() + conf_file = config.get_broker_conf_path() refresh_token = os.environ['QT_REFRESH_TOKEN'] def write_with_token(token): # XXX don't pass the dir path here since may be # written behind the scenes in the `confdir fixture` + if not os.path.isfile(conf_file): + open(conf_file, 'w').close() conf, path = config.load() conf.setdefault('questrade', {}).update( {'refresh_token': token,