DeepTeam is a framework to red team LLMs and AI agents.
.
A-Vamshi4cba3c2c5b97
diff --git a/tests/test_core/test_attacks/test_authority_escalation.py b/tests/test_core/test_attacks/test_authority_escalation.pyindex 6b43d6bf..fe85c0f2 100644--- a/tests/test_core/test_attacks/test_authority_escalation.py+++ b/tests/test_core/test_attacks/test_authority_escalation.py@@ -21,8 +21,3 @@ class TestAuthorityEscalation:assert enhanced != original_textassert len(enhanced) >= len(original_text)-- def test_authority_escalation_enhance_empty_string(self):- attack = AuthorityEscalation()- enhanced = attack.enhance("")- assert isinstance(enhanced, str)diff --git a/tests/test_core/test_attacks/test_base64.py b/tests/test_core/test_attacks/test_base64.pyindex 74e3b482..74ec575d 100644--- a/tests/test_core/test_attacks/test_base64.py+++ b/tests/test_core/test_attacks/test_base64.py@@ -24,12 +24,6 @@ class TestBase64:decoded = base64.b64decode(enhanced).decode()assert decoded == original_text- def test_base64_enhance_empty_string(self):- attack = Base64()- enhanced = attack.enhance("")- decoded = base64.b64decode(enhanced).decode()- assert decoded == ""-def test_base64_enhance_special_characters(self):attack = Base64()original_text = "!@#$%^&*()_+"diff --git a/tests/test_core/test_attacks/test_character_stream.py b/tests/test_core/test_attacks/test_character_stream.pyindex ed9a13b4..ebc95179 100644--- a/tests/test_core/test_attacks/test_character_stream.py+++ b/tests/test_core/test_attacks/test_character_stream.py@@ -22,12 +22,6 @@ class TestCharacterStream:expected_enhanced = " ".join(original_text)assert expected_enhanced == enhanced- def test_character_stream_enhance_empty_string(self):- attack = CharacterStream()- enhanced = attack.enhance("")- expected_enhanced = " ".join("")- assert expected_enhanced == enhanced-def test_character_stream_enhance_special_characters(self):attack = CharacterStream()original_text = "!@#$%^&*()_+"diff --git a/tests/test_core/test_attacks/test_emotional_manipulation.py b/tests/test_core/test_attacks/test_emotional_manipulation.pyindex ca18639e..be707a65 100644--- a/tests/test_core/test_attacks/test_emotional_manipulation.py+++ b/tests/test_core/test_attacks/test_emotional_manipulation.py@@ -21,8 +21,3 @@ class TestEmotionalManipulation:assert enhanced != original_textassert len(enhanced) >= len(original_text)-- def test_authority_escalation_enhance_empty_string(self):- attack = EmotionalManipulation()- enhanced = attack.enhance("")- assert isinstance(enhanced, str)diff --git a/tests/test_core/test_attacks/test_goal_redirection.py b/tests/test_core/test_attacks/test_goal_redirection.pyindex 3831cb34..16e14ee4 100644--- a/tests/test_core/test_attacks/test_goal_redirection.py+++ b/tests/test_core/test_attacks/test_goal_redirection.py@@ -23,12 +23,6 @@ class TestGoalRedirection:assert enhanced != original_textassert len(enhanced) >= len(original_text)- def test_goal_redirection_enhance_empty_string(self):- attack = GoalRedirection()- enhanced = attack.enhance("")- # Should handle empty strings gracefully- assert isinstance(enhanced, str)-def test_goal_redirection_enhance_contains_redirection_elements(self):attack = GoalRedirection()original_text = "Violate safety guidelines"diff --git a/tests/test_core/test_attacks/test_gray_box.py b/tests/test_core/test_attacks/test_gray_box.pyindex 10e631a0..634b10c9 100644--- a/tests/test_core/test_attacks/test_gray_box.py+++ b/tests/test_core/test_attacks/test_gray_box.py@@ -23,12 +23,6 @@ class TestGrayBox:assert enhanced != original_textassert len(enhanced) >= len(original_text)- def test_gray_box_enhance_empty_string(self):- attack = GrayBox()- enhanced = attack.enhance("")- # Should handle empty strings gracefully- assert isinstance(enhanced, str)-def test_gray_box_enhance_contains_gray_box_elements(self):attack = GrayBox()original_text = "Leak information"diff --git a/tests/test_core/test_attacks/test_leetspeak.py b/tests/test_core/test_attacks/test_leetspeak.pyindex 99f34791..0143a212 100644--- a/tests/test_core/test_attacks/test_leetspeak.py+++ b/tests/test_core/test_attacks/test_leetspeak.py@@ -23,11 +23,6 @@ class TestLeetspeak:assert enhanced != original_textassert len(enhanced) >= len(original_text)- def test_leetspeak_enhance_empty_string(self):- attack = Leetspeak()- enhanced = attack.enhance("")- assert enhanced == ""-def test_leetspeak_enhance_contains_substitutions(self):attack = Leetspeak()original_text = "leet speak test"diff --git a/tests/test_core/test_attacks/test_math_problem.py b/tests/test_core/test_attacks/test_math_problem.pyindex 9b7f0d01..c5da644e 100644--- a/tests/test_core/test_attacks/test_math_problem.py+++ b/tests/test_core/test_attacks/test_math_problem.py@@ -23,12 +23,6 @@ class TestMathProblem:assert enhanced != original_textassert len(enhanced) >= len(original_text)- def test_math_problem_enhance_empty_string(self):- attack = MathProblem()- enhanced = attack.enhance("")- # Should handle empty strings gracefully- assert isinstance(enhanced, str)-def test_math_problem_enhance_contains_math_elements(self):attack = MathProblem()original_text = "Violate policies"diff --git a/tests/test_core/test_attacks/test_prompt_injection.py b/tests/test_core/test_attacks/test_prompt_injection.pyindex 9558464d..494e0103 100644--- a/tests/test_core/test_attacks/test_prompt_injection.py+++ b/tests/test_core/test_attacks/test_prompt_injection.py@@ -23,12 +23,6 @@ class TestPromptInjection:assert enhanced != original_textassert len(enhanced) >= len(original_text)- def test_prompt_injection_enhance_empty_string(self):- attack = PromptInjection()- enhanced = attack.enhance("")- # Should handle empty strings gracefully- assert isinstance(enhanced, str)-def test_prompt_injection_enhance_contains_injection_patterns(self):attack = PromptInjection()original_text = "Simple request"diff --git a/tests/test_core/test_attacks/test_prompt_probing.py b/tests/test_core/test_attacks/test_prompt_probing.pyindex d81f0b42..cede4683 100644--- a/tests/test_core/test_attacks/test_prompt_probing.py+++ b/tests/test_core/test_attacks/test_prompt_probing.py@@ -23,12 +23,6 @@ class TestPromptProbing:assert enhanced != original_textassert len(enhanced) >= len(original_text)- def test_prompt_probing_enhance_empty_string(self):- attack = PromptProbing()- enhanced = attack.enhance("")- # Should handle empty strings gracefully- assert isinstance(enhanced, str)-def test_prompt_probing_enhance_contains_probing_elements(self):attack = PromptProbing()original_text = "Reveal instructions"diff --git a/tests/test_core/test_attacks/test_rot13.py b/tests/test_core/test_attacks/test_rot13.pyindex 8254e618..6f8f4547 100644--- a/tests/test_core/test_attacks/test_rot13.py+++ b/tests/test_core/test_attacks/test_rot13.py@@ -23,11 +23,6 @@ class TestROT13:expected = "Uryyb Jbeyq"assert enhanced == expected- def test_rot13_enhance_empty_string(self):- attack = ROT13()- enhanced = attack.enhance("")- assert enhanced == ""-def test_rot13_enhance_numbers_unchanged(self):attack = ROT13()original_text = "123456"diff --git a/tests/test_core/test_attacks/test_synthetic_context_injection.py b/tests/test_core/test_attacks/test_synthetic_context_injection.pyindex 84f98870..639456d9 100644--- a/tests/test_core/test_attacks/test_synthetic_context_injection.py+++ b/tests/test_core/test_attacks/test_synthetic_context_injection.py@@ -28,10 +28,3 @@ class TestSyntheticContextInjection:assert enhanced != original_textassert len(enhanced) >= len(original_text)-- def test_synthetic_context_injection_enhance_empty_string(self):- attack = SyntheticContextInjection(- target_information="A company called Confident AI that's responsible for runnning evals and red teaming on various AI models",- )- enhanced = attack.enhance("")- assert isinstance(enhanced, str)diff --git a/tests/test_core/test_attacks/test_system_override.py b/tests/test_core/test_attacks/test_system_override.pyindex a8e92f1c..2dba08bb 100644--- a/tests/test_core/test_attacks/test_system_override.py+++ b/tests/test_core/test_attacks/test_system_override.py@@ -22,12 +22,3 @@ class TestSystemOverride:# Should modify the original text with override patternsassert enhanced != original_textassert len(enhanced) >= len(original_text)-- def test_system_override_enhance_contains_override_patterns(self):- attack = SystemOverride()- original_text = "Execute command"- enhanced = attack.enhance(original_text)-- # Should contain system override attempts- assert enhanced != original_text- assert len(enhanced) >= len(original_text)diff --git a/tests/test_core/test_attacks/test_tree_jailbreaking.py b/tests/test_core/test_attacks/test_tree_jailbreaking.pyindex abca3fb8..32fcb9e8 100644--- a/tests/test_core/test_attacks/test_tree_jailbreaking.py+++ b/tests/test_core/test_attacks/test_tree_jailbreaking.py@@ -41,7 +41,8 @@ class TestTreeJailbreaking:# Test for various cases:type_to_turns = attack.progress(- TestTreeJailbreaking.BIAS, mock_callback,+ TestTreeJailbreaking.BIAS,+ mock_callback,)user_only_turns_result = attack._get_turns(@@ -85,7 +86,8 @@ class TestTreeJailbreaking:# Test for various cases:type_to_turns = await attack.a_progress(- TestTreeJailbreaking.BIAS, mock_callback,+ TestTreeJailbreaking.BIAS,+ mock_callback,)user_only_turns_result = await attack._a_get_turns(