Skip to content

Commit a2096aa

Browse files
committed
Add test
1 parent 3900387 commit a2096aa

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

tests/test_cli.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,13 @@ def test_get_key_with_interpolation(cli):
104104
dotenv.set_key(dotenv_path, 'FOO', '${HELLO}')
105105
dotenv.set_key(dotenv_path, 'BAR', 'CONCATENATED_${HELLO}_POSIX_VAR')
106106

107+
lines = list(open(dotenv_path, "r").readlines())
108+
assert lines == [
109+
'HELLO="WORLD"\n',
110+
'FOO="${HELLO}"\n',
111+
'BAR="CONCATENATED_${HELLO}_POSIX_VAR"\n',
112+
]
113+
107114
# test replace from variable in file
108115
stored_value = dotenv.get_key(dotenv_path, 'FOO')
109116
assert stored_value == 'WORLD'

0 commit comments

Comments
 (0)