def test_loadConfiguration(self): """Test load configuration """ file_path = os.path.join(self._data, "config-file-loadConfiguration-test1.txt") res = files.loadConfiguration(file_path, "config") baseline = type('obj', (object,), {'value1': 1, 'value2': "value"}) self.assertTrue(baseline.value1 == res.value1 and baseline.value2 == res.value2)
def test_loadConfiguration(self): """Test load configuration """ file_path = os.path.join(self._data, "config-file-loadConfiguration-test1.txt") res = files.loadConfiguration(file_path, "config") baseline = type('obj', (object,), {'value1': 1, 'value2': "value", 'value3': True, 'value4': False, 'value7': 2.5}) setattr(baseline,'value5',[0,1]) setattr(baseline,'value6',{'vdic1':'test'}) self.assertTrue(baseline.value1 == res.value1 and baseline.value2 == res.value2 and baseline.value3 == res.value3 and baseline.value4 == res.value4 and baseline.value5 == res.value5 and baseline.value6 == res.value6 and baseline.value7 == res.value7)
def test_loadConfiguration(self): """Test load configuration """ file_path = os.path.join(self._data, "config-file-loadConfiguration-test1.txt") res = files.loadConfiguration(file_path, "config") baseline = type( 'obj', (object, ), { 'value1': 1, 'value2': "value", 'value3': True, 'value4': False, 'value7': 2.5 }) setattr(baseline, 'value5', [0, 1]) setattr(baseline, 'value6', {'vdic1': 'test'}) self.assertTrue( baseline.value1 == res.value1 and baseline.value2 == res.value2 and baseline.value3 == res.value3 and baseline.value4 == res.value4 and baseline.value5 == res.value5 and baseline.value6 == res.value6 and baseline.value7 == res.value7)