예제 #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()
예제 #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
예제 #3
0
def test_help():
    sys.argv += '--help'.split()
    with pytest.raises(SystemExit):
        openqa_review.main()
예제 #4
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()
예제 #5
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
예제 #6
0
def test_help():
    sys.argv += "--help".split()
    with pytest.raises(SystemExit):
        openqa_review.main()