33from os .path import dirname , join
44
55import dotenv
6+ from dotenv .cli import cli as dotenv_cli
67
78import sh
89
@@ -23,13 +24,13 @@ def test_get_key():
2324
2425def test_list (cli , dotenv_file ):
2526 success , key_to_set , value_to_set = dotenv .set_key (dotenv_file , 'HELLO' , 'WORLD' )
26- result = cli .invoke (dotenv . cli . cli , ['--file' , dotenv_file , 'list' ])
27+ result = cli .invoke (dotenv_cli , ['--file' , dotenv_file , 'list' ])
2728 assert result .exit_code == 0 , result .output
28- assert result .output == 'HELLO=" WORLD" \n '
29+ assert result .output == 'HELLO=WORLD\n '
2930
3031
3132def test_list_wo_file (cli ):
32- result = cli .invoke (dotenv . cli . cli , ['--file' , 'doesnotexists' , 'list' ])
33+ result = cli .invoke (dotenv_cli , ['--file' , 'doesnotexists' , 'list' ])
3334 assert result .exit_code == 2 , result .output
3435 assert 'Invalid value for "-f"' in result .output
3536
@@ -117,7 +118,7 @@ def test_default_path(cli):
117118 sh .cd (here )
118119 sh .dotenv ('set' , 'HELLO' , 'WORLD' )
119120 output = sh .dotenv ('get' , 'HELLO' )
120- assert output == 'HELLO=" WORLD" \n '
121+ assert output == 'HELLO=WORLD\n '
121122 sh .rm (dotenv_path )
122123
123124
0 commit comments