test_tempest.py 文件源码

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

项目:functest 作者: opnfv 项目源码 文件源码
def test_apply_tempest_blacklist_no_blacklist(self):
        with mock.patch('__builtin__.open', mock.mock_open()) as m, \
            mock.patch.object(self.tempestcommon, 'read_file',
                              return_value=['test1', 'test2']):
            conf_utils.TEMPEST_BLACKLIST = Exception
            CONST.__setattr__('INSTALLER_TYPE', 'installer_type')
            CONST.__setattr__('DEPLOY_SCENARIO', 'deploy_scenario')
            self.tempestcommon.apply_tempest_blacklist()
            obj = m()
            obj.write.assert_any_call('test1\n')
            obj.write.assert_any_call('test2\n')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号