Improve context logging output
This commit is contained in:
@@ -15,11 +15,12 @@ class TestModelInvalidJson(ReplyBase):
|
||||
|
||||
def test(self, testapp, requests_mock, mocker):
|
||||
"""Test logging of context containing an invalid JSON tool call."""
|
||||
console_print = mocker.patch(
|
||||
"rich.console.Console.print", return_value=mocker.Mock()
|
||||
)
|
||||
mocker.patch("rich.console.Console.print")
|
||||
console_print = mocker.patch("rich.padding.Padding.__init__", return_value=None)
|
||||
super().test(testapp, requests_mock)
|
||||
console_print.assert_any_call("[red]Invalid JSON generated by the model:[/red]")
|
||||
console_print.assert_any_call(
|
||||
"[red]Invalid JSON generated by the model:[/red]", (0, 4)
|
||||
)
|
||||
|
||||
|
||||
def test_redact_headers():
|
||||
|
||||
Reference in New Issue
Block a user