cmm: replaced options '--with-tags' and '--with-file' with '--with-metadata'
This commit is contained in:
+10
-2
@@ -41,10 +41,14 @@ class TestChat(TestChatBase):
|
||||
self.message1 = Message(Question('Question 1'),
|
||||
Answer('Answer 1'),
|
||||
{Tag('atag1'), Tag('btag2')},
|
||||
ai='FakeAI',
|
||||
model='FakeModel',
|
||||
file_path=pathlib.Path(f'0001{msg_suffix}'))
|
||||
self.message2 = Message(Question('Question 2'),
|
||||
Answer('Answer 2'),
|
||||
{Tag('btag2')},
|
||||
ai='FakeAI',
|
||||
model='FakeModel',
|
||||
file_path=pathlib.Path(f'0002{msg_suffix}'))
|
||||
self.maxDiff = None
|
||||
|
||||
@@ -156,17 +160,21 @@ Answer 2
|
||||
self.assertEqual(mock_stdout.getvalue(), expected_output)
|
||||
|
||||
@patch('sys.stdout', new_callable=StringIO)
|
||||
def test_print_with_tags_and_file(self, mock_stdout: StringIO) -> None:
|
||||
def test_print_with_metadata(self, mock_stdout: StringIO) -> None:
|
||||
self.chat.msg_add([self.message1, self.message2])
|
||||
self.chat.print(paged=False, with_tags=True, with_files=True)
|
||||
self.chat.print(paged=False, with_metadata=True)
|
||||
expected_output = f"""{TagLine.prefix} atag1 btag2
|
||||
FILE: 0001{msg_suffix}
|
||||
AI: FakeAI
|
||||
MODEL: FakeModel
|
||||
{Question.txt_header}
|
||||
Question 1
|
||||
{Answer.txt_header}
|
||||
Answer 1
|
||||
{TagLine.prefix} btag2
|
||||
FILE: 0002{msg_suffix}
|
||||
AI: FakeAI
|
||||
MODEL: FakeModel
|
||||
{Question.txt_header}
|
||||
Question 2
|
||||
{Answer.txt_header}
|
||||
|
||||
Reference in New Issue
Block a user