Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_set_dir_path(self):
root_path = os.path.join(
current_path, '.directory_for_tubeup_set_dir_path_test')
dir_paths_dict = dict(root=root_path,
downloads=os.path.join(root_path,
DOWNLOAD_DIR_NAME))
self.tu.dir_path = root_path
self.assertEqual(self.tu.dir_path, dir_paths_dict)
# Make sure that other directories are created as well
self.assertTrue(os.path.exists(dir_paths_dict['downloads']))
# Clean the test directory
shutil.rmtree(root_path, ignore_errors=True)