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(""))
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."))
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."))
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"))
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"))