test_viewer.py 文件源码

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

项目:omnic 作者: michaelpb 项目源码 文件源码
def setup_method(self, method):
        singletons.settings.use_settings(MockConfig)
        mocked_file = mock.mock_open(read_data=self.JSON_DATA)

        def mocked_exists(path): return path == self.JSON_PATH
        self.open_patch = mock.patch('omnic.web.viewer.open', mocked_file)
        self.exists_patch = mock.patch('os.path.exists', mocked_exists)
        self.open_patch.start()
        self.exists_patch.start()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号