Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add test
  • Loading branch information
Flimm committed Mar 30, 2017
commit a2096aa6fc7425ed5c8d9280cc3acd05a6fa5eab
7 changes: 7 additions & 0 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,13 @@ def test_get_key_with_interpolation(cli):
dotenv.set_key(dotenv_path, 'FOO', '${HELLO}')
dotenv.set_key(dotenv_path, 'BAR', 'CONCATENATED_${HELLO}_POSIX_VAR')

lines = list(open(dotenv_path, "r").readlines())
assert lines == [
'HELLO="WORLD"\n',
'FOO="${HELLO}"\n',
'BAR="CONCATENATED_${HELLO}_POSIX_VAR"\n',
]

# test replace from variable in file
stored_value = dotenv.get_key(dotenv_path, 'FOO')
assert stored_value == 'WORLD'
Expand Down