def test_validate_server_unicode(self): self.virt_config = EsxConfigSection('test_esx', None) for key, value in self.UNICODE_SERVER_CONFIG.items(): self.virt_config[key] = value result = self.virt_config._validate_server('server') expected_result = ('error', "Option server needs to be ASCII characters only: 'test_esx'") six.assertCountEqual(self, result, expected_result)
def setUp(self): config_values = { 'type': 'esx', 'server': 'localhost', 'username': '******', 'password': '******', 'owner': 'owner', } config = EsxConfigSection('test', None) config.update(**config_values) config.validate() self.esx = Esx(self.logger, config, None, interval=DefaultInterval) # No dest given here