Skip to content

Commit

Permalink
test error message in test_invalid_enviroment_variables_config test.
Browse files Browse the repository at this point in the history
  • Loading branch information
hramezani authored and berkerpeksag committed Jan 16, 2017
1 parent 79a9697 commit e007601
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,12 +302,13 @@ def test_load_enviroment_variables_config(monkeypatch):
assert app.cfg.workers == 4


def test_invalid_enviroment_variables_config(monkeypatch):
def test_invalid_enviroment_variables_config(monkeypatch, capsys):
monkeypatch.setenv("GUNICORN_CMD_ARGS", "--foo=bar")
with AltArgs():
with pytest.raises(SystemExit):
NoConfigApp()

_, err = capsys.readouterr()
assert "error: unrecognized arguments: --foo" in err

def test_cli_overrides_enviroment_variables_module(monkeypatch):
monkeypatch.setenv("GUNICORN_CMD_ARGS", "--workers=4")
Expand Down

0 comments on commit e007601

Please sign in to comment.