rename to FLASK_SKIP_DOTENV, add docs, test

This commit is contained in:
David Lord 2018-04-28 08:07:53 -07:00
parent 2a568b4c9c
commit eb52ca4625
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):