Beispiel #1
0
 def test_getattr_search_path_no_match(self):
     config = BaseConfig()
     config.search_path = ["_first", "_middle", "_last"]
     config._first = {}
     config._middle = {}
     config._last = {}
     self.assertEquals(config.foo, None)
Beispiel #2
0
 def test_getattr_search_path_match_first(self):
     config = BaseConfig()
     config.search_path = ["_first", "_middle", "_last"]
     config._first = {"foo": "bar"}
     config._middle = {}
     config._last = {}
     self.assertEquals(config.foo, "bar")
Beispiel #3
0
 def test_getattr_search_path_match_last(self):
     config = BaseConfig()
     config.search_path = ['_first', '_middle', '_last']
     config._first = {}
     config._middle = {}
     config._last = {'foo': 'bar'}
     self.assertEquals(config.foo, 'bar')
Beispiel #4
0
 def test_getattr_search_path_match_first(self):
     config = BaseConfig()
     config.search_path = ['_first', '_middle', '_last']
     config._first = {'foo': 'bar'}
     config._middle = {}
     config._last = {}
     self.assertEquals(config.foo, 'bar')
Beispiel #5
0
 def test_getattr_search_path_no_match(self):
     config = BaseConfig()
     config.search_path = ['_first', '_middle', '_last']
     config._first = {}
     config._middle = {}
     config._last = {}
     self.assertEquals(config.foo, None)
Beispiel #6
0
 def test_getattr_empty_search_path(self):
     config = BaseConfig()
     config.search_path = []
     self.assertEquals(config.foo, None)
Beispiel #7
0
 def test_getattr_empty_search_path(self):
     config = BaseConfig()
     config.search_path = []
     self.assertEquals(config.foo, None)