Potential fix for pull request finding 'Imprecise assert'

Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
This commit is contained in:
Mohd Kaif
2026-04-07 17:53:26 +05:30
committed by GitHub
co-authored by Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
parent 655a24b77e
commit c77690129d
+2 -1
View File
@@ -230,7 +230,8 @@ class TestCheckPolicy(unittest.TestCase):
result = json.loads(self.kit.check_policy("{not valid json}"))
# Implementation returns {"compliant": False, "violations": [...], "warnings": [...]}
self.assertFalse(result["compliant"])
self.assertTrue(len(result.get("violations", [])) > 0)
violations = result.get("violations", [])
self.assertGreater(len(violations), 0)
class TestGetDecisionSummary(unittest.TestCase):