From 46ee6de13e340b8ccf7f4f1f8340e9c1de196123 Mon Sep 17 00:00:00 2001 From: Shreya Malviya Date: Wed, 31 Aug 2022 00:58:01 +0530 Subject: [PATCH] UT: Remove unneeded function `convert_all_lists_to_tuples_in_mapping()` --- monkey/tests/utils.py | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/monkey/tests/utils.py b/monkey/tests/utils.py index 1211e72bc..b2268e572 100644 --- a/monkey/tests/utils.py +++ b/monkey/tests/utils.py @@ -1,7 +1,7 @@ import ctypes import os from pathlib import Path -from typing import Iterable, Mapping +from typing import Iterable def is_user_admin(): @@ -31,15 +31,3 @@ def add_files_to_dir(parent_dir: Path, file_names: Iterable[str]) -> Iterable[Pa f.touch() return files - - -# This is only needed since values are compared in configuration objects in the tests. -# In practice, the list/tuple differences shouldn't make any difference since both are iterable. -def convert_all_lists_to_tuples_in_mapping(configuration: Mapping): - for key in configuration: - value = configuration[key] - if isinstance(value, list): - configuration[key] = tuple(value) - if isinstance(value, Mapping): - convert_all_lists_to_tuples_in_mapping(value) - return configuration