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