mirror of https://github.com/OWASP/Nettacker.git
Fix a typo in sort dictionary method name
This commit is contained in:
parent
d926de783b
commit
1b4e6296a3
|
@ -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
|
||||
|
||||
|
|
|
@ -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['...']
|
||||
|
|
|
@ -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 @@ class UtilityTesting(unittest.TestCase):
|
|||
'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"""
|
||||
|
|
Loading…
Reference in New Issue