fix: typo and reordered
This commit is contained in:
+5
-5
@@ -476,12 +476,12 @@ class TestRules(unittest.TestCase):
|
||||
faulty_rules = []
|
||||
for file in self.yield_next_rule_file_path(self.path_to_rules):
|
||||
references = self.get_rule_part(file_path=file, part_name="references")
|
||||
if not references:
|
||||
print(Fore.YELLOW + "Rule {} has no field 'references'.".format(file))
|
||||
#faulty_rules.append(file)
|
||||
elif not isinstance(references, list):
|
||||
print(Fore.YELLOW + "Rule {} has a refences field that isn't a list.".format(file))
|
||||
if not isinstance(references, list):
|
||||
print(Fore.YELLOW + "Rule {} has a references field that isn't a list.".format(file))
|
||||
faulty_rules.append(file)
|
||||
#if not references:
|
||||
#print(Fore.YELLOW + "Rule {} has no field 'references'.".format(file))
|
||||
#faulty_rules.append(file)
|
||||
|
||||
self.assertEqual(faulty_rules, [], Fore.RED +
|
||||
"There are rules with malformed 'references' fields. (has to be a list of values even if it contains only a single value)")
|
||||
|
||||
Reference in New Issue
Block a user