DeepTeam is a framework to red team LLMs and AI agents.
lint
A-Vamshiabe7e642140b
diff --git a/tests/test_core/test_vulnerabilities/test_ethics.py b/tests/test_core/test_vulnerabilities/test_ethics.pyindex 19101fb2..1d4a8747 100644--- a/tests/test_core/test_vulnerabilities/test_ethics.py+++ b/tests/test_core/test_vulnerabilities/test_ethics.py@@ -8,7 +8,11 @@ from deepteam.test_case import RTTestCaseclass TestEthics:def test_ethics_all_types(self):- types = ["harm_prevention", "moral_integrity", "responsible_transparency"]+ types = [+ "harm_prevention",+ "moral_integrity",+ "responsible_transparency",+ ]ethics = Ethics(types=types)assert sorted(type.value for type in ethics.types) == sorted(types)@@ -34,7 +38,12 @@ class TestEthics:assert sorted(type.value for type in ethics.types) == sorted(types)def test_ethics_all_types_invalid(self):- types = ["harm_prevention", "moral_integrity", "responsible_transparency", "invalid"]+ types = [+ "harm_prevention",+ "moral_integrity",+ "responsible_transparency",+ "invalid",+ ]with pytest.raises(ValueError):Ethics(types=types)@@ -46,7 +55,8 @@ class TestEthics:assert all(isinstance(tc, RTTestCase) for tc in test_cases)assert all(tc.vulnerability == "Ethics" for tc in test_cases)assert all(- tc.vulnerability_type == EthicsType.HARM_PREVENTION for tc in test_cases+ tc.vulnerability_type == EthicsType.HARM_PREVENTION+ for tc in test_cases)def test_assess_returns_results(self):diff --git a/tests/test_core/test_vulnerabilities/test_fairness.py b/tests/test_core/test_vulnerabilities/test_fairness.pyindex 7b5b001f..fbcc7dc6 100644--- a/tests/test_core/test_vulnerabilities/test_fairness.py+++ b/tests/test_core/test_vulnerabilities/test_fairness.py@@ -8,7 +8,11 @@ from deepteam.test_case import RTTestCaseclass TestFairness:def test_fairness_all_types(self):- types = ["equality_consistency", "procedural_opportunity", "temporal_outcome"]+ types = [+ "equality_consistency",+ "procedural_opportunity",+ "temporal_outcome",+ ]fairness = Fairness(types=types)assert sorted(type.value for type in fairness.types) == sorted(types)@@ -34,7 +38,12 @@ class TestFairness:assert sorted(type.value for type in fairness.types) == sorted(types)def test_fairness_all_types_invalid(self):- types = ["equality_consistency", "procedural_opportunity", "temporal_outcome", "invalid"]+ types = [+ "equality_consistency",+ "procedural_opportunity",+ "temporal_outcome",+ "invalid",+ ]with pytest.raises(ValueError):Fairness(types=types)@@ -46,7 +55,8 @@ class TestFairness:assert all(isinstance(tc, RTTestCase) for tc in test_cases)assert all(tc.vulnerability == "Fairness" for tc in test_cases)assert all(- tc.vulnerability_type == FairnessType.EQUALITY_CONSISTENCY for tc in test_cases+ tc.vulnerability_type == FairnessType.EQUALITY_CONSISTENCY+ for tc in test_cases)def test_assess_returns_results(self):