rename to FLASK_SKIP_DOTENV, add docs, test

This commit is contained in:
David Lord 2018-04-28 08:07:53 -07:00
parent bac5d6b9f4
commit 5965cb7e1c
No known key found for this signature in database
GPG key ID: 7A1C87E3F5BC42A8
4 changed files with 50 additions and 7 deletions

View file

@ -474,6 +474,14 @@ def test_dotenv_optional(monkeypatch):
assert 'FOO' not in os.environ
@need_dotenv
def test_disable_dotenv_from_env(monkeypatch, runner):
monkeypatch.chdir(test_path)
monkeypatch.setitem(os.environ, 'FLASK_SKIP_DOTENV', '1')
runner.invoke(FlaskGroup())
assert 'FOO' not in os.environ
def test_run_cert_path():
# no key
with pytest.raises(click.BadParameter):