Fix #2937: Ensure the consistency in load_dotenv's return type

This commit is contained in:
Adarsh Sharma 2018-10-11 16:52:15 +05:30 committed by David Lord
parent d9fa28ba68
commit db8cb31f2b
No known key found for this signature in database
GPG key ID: 7A1C87E3F5BC42A8
3 changed files with 19 additions and 3 deletions

View file

@ -513,7 +513,7 @@ def test_load_dotenv(monkeypatch):
monkeypatch.setenv("EGGS", "3")
monkeypatch.chdir(os.path.join(test_path, "cliapp", "inner1"))
load_dotenv()
assert load_dotenv()
assert os.getcwd() == test_path
# .flaskenv doesn't overwrite .env
assert os.environ["FOO"] == "env"
@ -524,6 +524,9 @@ def test_load_dotenv(monkeypatch):
# set manually, files don't overwrite
assert os.environ["EGGS"] == "3"
# Non existent file should not load
assert not load_dotenv('non-existent-file')
@need_dotenv
def test_dotenv_path(monkeypatch):