예제 #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
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
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
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"))