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