utils.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:SensDB3 作者: aapris 项目源码 文件源码
def enable(self):
        # Just patch default cache to always find nothing
        # since drf-extensions stores the instance of the cache everywhere,
        # which makes it impossible to replace with DummyCache
        def mocked_cache_get(key, default=None, version=None):
            return default
        self.patch = patch.object(cache_module.cache, 'get', mocked_cache_get)
        self.patch.start()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号