diff --git a/core/load_modules.py b/core/load_modules.py index 7bc99edaa..f153e2fc7 100644 --- a/core/load_modules.py +++ b/core/load_modules.py @@ -236,7 +236,7 @@ def load_all_modules(limit=-1, full_details=False): """ # Search for Modules from config import nettacker_paths - from core.utility import sort_dictonary + from core.utility import sort_dictionary if full_details: import yaml module_names = {} @@ -260,7 +260,7 @@ def load_all_modules(limit=-1, full_details=False): if len(module_names) == limit: module_names['...'] = {} break - module_names = sort_dictonary(module_names) + module_names = sort_dictionary(module_names) module_names['all'] = {} return module_names @@ -273,7 +273,7 @@ def load_all_profiles(limit=-1): Returns: an array of all profile names """ - from core.utility import sort_dictonary + from core.utility import sort_dictionary all_modules_with_details = load_all_modules(limit=limit, full_details=True) profiles = {} if '...' in all_modules_with_details: @@ -287,11 +287,11 @@ def load_all_profiles(limit=-1): else: profiles[tag].append(key) if len(profiles) == limit: - profiles = sort_dictonary(profiles) + profiles = sort_dictionary(profiles) profiles['...'] = [] profiles['all'] = [] return profiles - profiles = sort_dictonary(profiles) + profiles = sort_dictionary(profiles) profiles['all'] = [] return profiles diff --git a/core/utility.py b/core/utility.py index c811f00ca..76ceb54cb 100644 --- a/core/utility.py +++ b/core/utility.py @@ -563,7 +563,7 @@ def expand_step(step): return [step] -def sort_dictonary(dictionary): +def sort_dictionary(dictionary): etc_flag = '...' in dictionary if etc_flag: del dictionary['...'] diff --git a/tests/core/utility.test.py b/tests/core/utility.test.py index 17aed1393..75a0f0675 100644 --- a/tests/core/utility.test.py +++ b/tests/core/utility.test.py @@ -15,8 +15,8 @@ class UtilityTesting(unittest.TestCase): This is the class that tests the utility module functions. """ - def test_sort_dictonary(self): - """Tests if the function sorts the input dictionary.""" + def test_sort_dictionary(self): + """Tests if the function sorts the input dictionary.""" input_dict = { 'a': 1, 'c': 3, @@ -29,7 +29,7 @@ def test_sort_dictonary(self): 'c': 3, 'd': 23, } - self.assertDictEqual(utility.sort_dictonary(input_dict), sorted_dict) + self.assertDictEqual(utility.sort_dictionary(input_dict), sorted_dict) def test_select_maximum_cpu_core(self): """Tests if it selects the proper amount of cpu's"""