Exemple #1
0
 def test_simple_value(self):
     config = ConfigNode({})
     compare(config.get('foo', 1), expected=1)
Exemple #2
0
 def test_get_list_number_key(self):
     config = ConfigNode([1])
     compare(config.get(0), expected=1)
Exemple #3
0
 def test_get_list_string_key(self):
     config = ConfigNode([1])
     compare(config.get('foo'), expected=None)
Exemple #4
0
 def test_get(self):
     config = ConfigNode({'foo': 1})
     compare(config.get('foo'), expected=1)
Exemple #5
0
 def test_get_default_default(self):
     config = ConfigNode({})
     compare(config.get('foo'), expected=None)
Exemple #6
0
 def test_simple_value(self):
     config = ConfigNode({})
     compare(config.get('foo', 1), expected=1)
Exemple #7
0
 def test_name_clash_with_real_attrs(self):
     # method, data, __method
     config = ConfigNode({'get': 1})
     compare(config.get('get'), expected=1)
Exemple #8
0
 def test_get_list_string_key(self):
     config = ConfigNode([1])
     compare(config.get('foo'), expected=None)
Exemple #9
0
 def test_get_list_number_key(self):
     config = ConfigNode([1])
     compare(config.get(0), expected=1)
Exemple #10
0
 def test_get_default_default(self):
     config = ConfigNode({})
     compare(config.get('foo'), expected=None)
Exemple #11
0
 def test_get(self):
     config = ConfigNode({'foo': 1})
     compare(config.get('foo'), expected=1)
Exemple #12
0
 def test_name_clash_with_real_attrs(self):
     # method, data, __method
     config = ConfigNode({'get': 1})
     compare(config.get('get'), expected=1)