コード例 #1
0
def test_check_branch_wrong_side(capsys, session, app, git):
    app.config['COLORS'] = False

    assert_that(message("testbranch..master", repository=git), equal_to(0))

    out, _ = capsys.readouterr()
    assert_that(out.strip(), equal_to(""))
コード例 #2
0
ファイル: test_check.py プロジェクト: greut/invenio-kwalitee
def test_check_branch_wrong_side(capsys, session, app, git):
    app.config['COLORS'] = False

    assert_that(message("testbranch..master", repository=git), equal_to(0))

    out, _ = capsys.readouterr()
    assert_that(out.strip(), equal_to(""))
コード例 #3
0
def test_check_branch(capsys, session, app, git):
    app.config['TRUSTED_DEVELOPERS'] = ('*****@*****.**', )
    app.config['SIGNATURES'] = ('By', )
    app.config['COMPONENTS'] = ('global', )
    app.config['COLORS'] = False

    assert_that(message("master..testbranch", repository=git), equal_to(0))

    out, _ = capsys.readouterr()
    assert_that(out.split("\n"), has_item("Everything is OK."))
コード例 #4
0
ファイル: test_check.py プロジェクト: greut/invenio-kwalitee
def test_check_branch(capsys, session, app, git):
    app.config['TRUSTED_DEVELOPERS'] = ('*****@*****.**',)
    app.config['SIGNATURES'] = ('By',)
    app.config['COMPONENTS'] = ('global',)
    app.config['COLORS'] = False

    assert_that(message("master..testbranch", repository=git), equal_to(0))

    out, _ = capsys.readouterr()
    assert_that(out.split("\n"), has_item("Everything is OK."))
コード例 #5
0
ファイル: test_check.py プロジェクト: greut/invenio-kwalitee
def test_check_head(capsys, session, app, git):
    app.config['COLORS'] = False

    assert_that(message("HEAD", repository=git), equal_to(1))

    out, _ = capsys.readouterr()
    assert_that(out.split("\n"),
                has_items("1: M110 missing component name",
                          "1: M101 signature is missing",
                          "1: M100 needs more reviewers"))
コード例 #6
0
def test_check_head(capsys, session, app, git):
    app.config['COLORS'] = False

    assert_that(message("HEAD", repository=git), equal_to(1))

    out, _ = capsys.readouterr()
    assert_that(
        out.split("\n"),
        has_items("1: M110 missing component name",
                  "1: M101 signature is missing",
                  "1: M100 needs more reviewers"))