Skip to content

Commit

Permalink
Environment variable for administrative db user
Browse files Browse the repository at this point in the history
  • Loading branch information
pylover committed Jan 7, 2023
1 parent 023fba8 commit 644c3d8
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import os

from bddcli import Given, Application as CLIApplication, status, stderr, \
when, stdout
import easycli
Expand All @@ -13,10 +15,15 @@ def __call__(self, args):
print('bar')


YHTTPDEV_DB_HOST = os.environ.get('YHTTPDEV_DB_HOST', '')
YHTTPDEV_DB_USER = os.environ.get('YHTTPDEV_DB_USER', '')
YHTTPDEV_DB_PASS = os.environ.get('YHTTPDEV_DB_PASS', '')


app = Application()
app.settings.merge('''
app.settings.merge(f'''
db:
url: postgres://:@/foo
url: postgres://{YHTTPDEV_DB_USER}:{YHTTPDEV_DB_PASS}@{YHTTPDEV_DB_HOST}/foo
''')
install(app, cliarguments=[Bar])

Expand Down

0 comments on commit 644c3d8

Please sign in to comment.