Skip to content

Commit

Permalink
Fixed status_code test in test_utils
Browse files Browse the repository at this point in the history
  • Loading branch information
Vikram Jayanthi committed Jul 16, 2020
1 parent bfc2b66 commit 5758261
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,11 +289,10 @@ def test_check_status_code_for_missing_status_code(capsys, repo_url):
captured = capsys.readouterr()
assert captured.out == "Content received from server:\nForbidden\n"

with pytest.raises(requests.HTTPError):
utils.check_status_code(response, False)

captured = capsys.readouterr()
assert captured.out == "NOTE: Try --verbose to see response content.\n"
if verbose:
assert "Content received from server:\nForbidden\n" in captured.out
else:
assert captured.out == "NOTE: Try --verbose to see response content.\n"


@pytest.mark.parametrize(
Expand Down

0 comments on commit 5758261

Please sign in to comment.