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))
def test_update_cached_counts(): # Just make sure it doesn't blow up or return anything. assert GcdBase().update_cached_counts({}) is None
def test_stat_counts(): assert GcdBase().stat_counts() == {}
def test_has_dependents(): assert GcdBase().has_dependents() is False