コード例 #1
0
def test_deletable(revisions, dependents):
    with mock.patch('%s.GcdBase.has_dependents' % GCDDATA) as dep_mock:
        dep_mock.return_value = dependents
        base = GcdBase()
        base.revisions = mock.MagicMock()
        base.revisions.active_set.return_value.exists.return_value = revisions

        deletable = base.deletable()
        assert deletable is not any((revisions, dependents))
コード例 #2
0
def test_update_cached_counts():
    # Just make sure it doesn't blow up or return anything.
    assert GcdBase().update_cached_counts({}) is None
コード例 #3
0
def test_stat_counts():
    assert GcdBase().stat_counts() == {}
コード例 #4
0
def test_has_dependents():
    assert GcdBase().has_dependents() is False