File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -228,6 +228,7 @@ async def test_input_guardrail_decorators():
228228 )
229229 assert not result .output .tripwire_triggered
230230 assert result .output .output_info == "test_1"
231+ assert guardrail .get_name () == "decorated_input_guardrail"
231232
232233 guardrail = decorated_named_input_guardrail
233234 result = await guardrail .run (
@@ -266,6 +267,7 @@ async def test_output_guardrail_decorators():
266267 )
267268 assert not result .output .tripwire_triggered
268269 assert result .output .output_info == "test_3"
270+ assert guardrail .get_name () == "decorated_output_guardrail"
269271
270272 guardrail = decorated_named_output_guardrail
271273 result = await guardrail .run (
Original file line number Diff line number Diff line change @@ -261,6 +261,7 @@ async def test_tool_input_guardrail_decorators():
261261 result = await guardrail .run (data )
262262 assert result .behavior ["type" ] == "allow"
263263 assert result .output_info == "test_1"
264+ assert guardrail .get_name () == "decorated_input_guardrail"
264265
265266 # Test named decorator
266267 guardrail = decorated_named_input_guardrail
@@ -294,6 +295,7 @@ async def test_tool_output_guardrail_decorators():
294295 result = await guardrail .run (data )
295296 assert result .behavior ["type" ] == "allow"
296297 assert result .output_info == "test_3"
298+ assert guardrail .get_name () == "decorated_output_guardrail"
297299
298300 # Test named decorator
299301 guardrail = decorated_named_output_guardrail
You can’t perform that action at this time.
0 commit comments