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()
评论列表
文章目录