Example #1
0
 def test_create_files(self, clean_tmp_dir):
     parent = ['/tmp']
     child = ['one', 'two', 'three']
     dirs = Utility.create_files(parent, child)
     assert dirs['one'] == '/tmp/one'
     assert os.path.exists(dirs['one']) is True
     assert dirs['two'] == '/tmp/two'
     assert os.path.exists(dirs['two']) is True
     assert dirs['three'] == '/tmp/three'
     assert os.path.exists(dirs['three']) is True
Example #2
0
    def generate_project_files(files):
        try:
            sub_file = Utility.create_files([files['main_dir']],
                                            files['sub_files'])
            dirs = Utility.create_dirs([files['main_dir']], files['sub_dirs'])
            project_dirs = Utility.create_dirs([dirs[files['project_name']]],
                                               files['project_dirs'])
            return sub_file, dirs, project_dirs

        except Exception as e:
            raise AfctlParserException(e)