test_cache.py 文件源码

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

项目:cloud-custodian 作者: capitalone 项目源码 文件源码
def test_get(self):
        #mock the pick and set it to the data variable
        test_pickle = pickle.dumps(
            {pickle.dumps(self.test_key): self.test_value}, protocol=2)
        self.test_cache.data = pickle.loads(test_pickle)

        #assert
        self.assertEquals(self.test_cache.get(self.test_key), self.test_value)
        self.assertEquals(self.test_cache.get(self.bad_key), None)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号