def test_get_internal_path_root_flat(self): outer_dir = test_dir inner_dir_name = "inner_dir" inner_dir_path = os.path.join(outer_dir, inner_dir_name) self.assertEqual( WebDependency.get_internal_path_root(outer_dir, inner_dir_name), inner_dir_path)
def test_get_internal_path_root_with_subfolders(self): outer_dir = test_dir first_level_dir_name = "first_dir" second_level_dir_name = "second_dir" inner_dir_path = os.path.join(outer_dir, first_level_dir_name) inner_second_dir_path = os.path.join(first_level_dir_name, second_level_dir_name) self.assertEqual( WebDependency.get_internal_path_root(outer_dir, inner_second_dir_path), inner_dir_path)