Ejemplo n.º 1
0
 def test_get_absolute_path(self):
     abs_path = '/foo/bar'
     self.assertEqual(get_absolute_path(abs_path), '/foo/bar',
                      'absolute path of absolute path not correct')
     rel_path = 'foo/bar'
     self.assertEqual(get_absolute_path(rel_path,
                                        base_dir='/the'), '/the/foo/bar',
                      'absolute path of relative path not correct')
Ejemplo n.º 2
0
 def __init__(self, config=None):
     self.config = config
     self.data_storage_path = get_absolute_path(
         self.config['data_storage']['firmware_file_storage_directory'])
     create_dir_for_file(self.data_storage_path)