コード例 #1
0
def test_ipub_has_dependents_issue_count(ipub_dep_mock):
    ipub = IndiciaPublisher(issue_count=1)
    has = ipub.has_dependents()
    assert has is True
コード例 #2
0
def test_ipub_stat_counts():
    with mock.patch('%s.IndiciaPublisher.active_issues' % PATH) as is_mock:
        is_mock.return_value.exists.return_value = False
        counts = IndiciaPublisher().stat_counts()
        assert counts == {'indicia publishers': 1}
コード例 #3
0
def test_ipub_has_dependents_revs_exist(ipub_dep_mock):
    ipub_dep_mock.active_set.return_value.exists.return_value = True
    ipub = IndiciaPublisher()
    has = ipub.has_dependents()
    assert has is True
コード例 #4
0
def test_ipub_has_no_dependents(ipub_dep_mock):
    ipub = IndiciaPublisher()
    has = ipub.has_dependents()
    assert has is False
    ipub_dep_mock.active_set.return_value.exists.assert_called_once_with()
コード例 #5
0
def test_ipub_has_dependents_issue_count(ipub_dep_mock):
    ipub = IndiciaPublisher(issue_count=1)
    has = ipub.has_dependents()
    assert has is True
コード例 #6
0
def test_ipub_has_dependents_revs_exist(ipub_dep_mock):
    ipub_dep_mock.active_set.return_value.exists.return_value = True
    ipub = IndiciaPublisher()
    has = ipub.has_dependents()
    assert has is True
コード例 #7
0
def test_ipub_has_no_dependents(ipub_dep_mock):
    ipub = IndiciaPublisher()
    has = ipub.has_dependents()
    assert has is False
    ipub_dep_mock.active_set.return_value.exists.assert_called_once_with()