コード例 #1
0
 def test_mixed_custom_attributes(self):
     fake_config = {
         'key': 'value', 'server_timeout': '50000'
     }
     resp_dict = validator.validate_custom_attributes(custom_attributes_dict,
                                                      'default', fake_config)
     self.assertTrue('key' not in list(resp_dict.keys()) and \
                     'server_timeout' in list(resp_dict.keys()))
コード例 #2
0
 def test_mixed_custom_attributes(self):
     fake_config = {
         'key': 'value', 'server_timeout': '50000'
     }
     resp_dict = validator.validate_custom_attributes(custom_attributes_dict,
                                                      'default', fake_config)
     self.assertTrue('key' not in resp_dict.keys() and \
                     'server_timeout' in resp_dict.keys())
コード例 #3
0
 def test_false_custom_attributes(self):
     fake_config = {
         'key1': 'value1', 'key2': 'value2'
     }
     resp_dict = validator.validate_custom_attributes(custom_attributes_dict,
                                                      'global', fake_config)
     self.assertFalse('key1' in list(resp_dict.keys()) or \
                      'key2' in list(resp_dict.keys()))
コード例 #4
0
 def test_false_custom_attributes(self):
     fake_config = {
         'key1': 'value1', 'key2': 'value2'
     }
     resp_dict = validator.validate_custom_attributes(custom_attributes_dict,
                                                      'global', fake_config)
     self.assertFalse('key1' in resp_dict.keys() or \
                      'key2' in resp_dict.keys())