Exemple #1
0
def test_query_issue_status_help_shows_config_help():
    sys.argv[1:] = ['--query-issue-status-help']
    with pytest.raises(SystemExit):
        # we are not actually testing the content of help, just that it does not fail
        openqa_review.main()
Exemple #2
0
def test_missing_config():
    openqa_review.CONFIG_PATH = "/dev/null/.missing_file"
    sys.argv[1:] = ['--query-issue-status']
    with pytest.raises(SystemExit) as excinfo:
        openqa_review.main()
    assert excinfo.value.code == 1
Exemple #3
0
def test_help():
    sys.argv += '--help'.split()
    with pytest.raises(SystemExit):
        openqa_review.main()
def test_query_issue_status_help_shows_config_help():
    sys.argv[1:] = ["--query-issue-status-help"]
    with pytest.raises(SystemExit):
        # we are not actually testing the content of help, just that it does not fail
        openqa_review.main()
def test_missing_config():
    openqa_review.CONFIG_PATH = "/dev/null/.missing_file"
    sys.argv[1:] = ["--query-issue-status"]
    with pytest.raises(SystemExit) as excinfo:
        openqa_review.main()
    assert excinfo.value.code == 1
def test_help():
    sys.argv += "--help".split()
    with pytest.raises(SystemExit):
        openqa_review.main()