Beispiel #1
0
def test_external_links_100(jira_mock):  # issue-5 is dependent on
    i5 = fakes.Issue('ISSUE-5')
    i5.fields.issuelinks = [
        fakes.IssueLink('outwardIssue', 'Dep-1'),
    ]
    jira_mock.search_issues.return_value = [i5]
    p, all_issues, all_with_dep = dep.dependency_factor(jira_mock, "jql")
    assert p == 100
    assert len(all_with_dep) == 1
    assert all_with_dep[0].key == 'ISSUE-5'
    assert len(all_issues) == 1
Beispiel #2
0
def test_external_links_0(
        jira_mock):  # issue-5 is a dependency for the other issue
    i5 = fakes.Issue('ISSUE-5')
    i5.fields.issuelinks = [
        fakes.IssueLink('inwardIssue', 'Dep-1'),
    ]
    jira_mock.search_issues.return_value = [i5]
    p, all_issues, all_with_dep = dep.dependency_factor(jira_mock, "jql")
    assert p == 0
    assert len(all_with_dep) == 0
    assert len(all_issues) == 1
Beispiel #3
0
def test_dependency_factor_0(jira_mock):
    p, all_issues, all_with_dep = dep.dependency_factor(jira_mock, "jql")
    assert p == 0
    assert all_with_dep == []
    assert len(all_issues) == 4