コード例 #1
0
def test_bitbucket_should_raise_ci_verification_error_for_wrong_branch(
        monkeypatch):
    monkeypatch.setenv('BITBUCKET_BRANCH', 'other-branch')
    monkeypatch.setenv('BITBUCKET_PR_ID', '')

    with pytest.raises(CiVerificationError):
        ci_checks.bitbucket('master')
コード例 #2
0
def test_bitbucket_should_raise_ci_verification_error_for_wrong_branch(
        monkeypatch):
    monkeypatch.setenv("BITBUCKET_BRANCH", "other-branch")
    monkeypatch.setenv("BITBUCKET_PR_ID", "")

    with pytest.raises(CiVerificationError):
        ci_checks.bitbucket("master")
コード例 #3
0
def test_bitbucket_should_pass_if_branch_is_master_and_no_pr(monkeypatch):
    monkeypatch.setenv('BITBUCKET_BRANCH', 'master')
    monkeypatch.setenv('BITBUCKET_PR_ID', '')

    assert ci_checks.bitbucket('master')
コード例 #4
0
def test_bitbucket_should_pass_if_branch_is_correct_and_no_pr(monkeypatch):
    monkeypatch.setenv('BITBUCKET_BRANCH', 'other-branch')
    monkeypatch.setenv('BITBUCKET_PR_ID', '')

    assert ci_checks.bitbucket('other-branch')
コード例 #5
0
def test_bitbucket_should_pass_if_branch_is_master_and_no_pr(monkeypatch):
    monkeypatch.setenv("BITBUCKET_BRANCH", "master")
    monkeypatch.setenv("BITBUCKET_PR_ID", "")

    assert ci_checks.bitbucket("master")
コード例 #6
0
def test_bitbucket_should_pass_if_branch_is_correct_and_no_pr(monkeypatch):
    monkeypatch.setenv("BITBUCKET_BRANCH", "other-branch")
    monkeypatch.setenv("BITBUCKET_PR_ID", "")

    assert ci_checks.bitbucket("other-branch")