Skip to content

Commit

Permalink
Create a blank config if none exists
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyler Goodlet committed Mar 18, 2019
1 parent 6746037 commit 33fb8b5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,15 @@ 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):
with open(conf_file, 'w') as f:
pass
conf, path = config.load()
conf.setdefault('questrade', {}).update(
{'refresh_token': token,
Expand Down

0 comments on commit 33fb8b5

Please sign in to comment.