from unittest.mock import Mock


def add_mock(monkeypatch):
    """ Mock cache add to return Mock object """
    _mock = Mock()
    monkeypatch.setattr('django.core.cache.cache.add', _mock)
    return _mock