def test_pub_has_no_dependents(pub_dep_mocks): pub = Publisher() has = pub.has_dependents() assert has is False # Check calls on this test case because it should hit all of them. for m in list(pub_dep_mocks.values()): m.return_value.exists.assert_called_once_with()
def test_pub_has_no_dependents(pub_dep_mocks): pub = Publisher() has = pub.has_dependents() assert has is False # Check calls on this test case because it should hit all of them. for m in pub_dep_mocks.values(): m.return_value.exists.assert_called_once_with()
def test_pub_has_non_dependents_nonzero_counts(pub_dep_mocks, which_count): pub = Publisher(**{'%s_count' % which_count: 1}) has = pub.has_dependents() assert has is False
def test_pub_has_dependents_revs_exist(pub_dep_mocks, which_exists): pub_dep_mocks[which_exists].return_value.exists.return_value = True pub = Publisher() has = pub.has_dependents() assert has is True