cmm: replaced options '--with-tags' and '--with-file' with '--with-metadata'
This commit is contained in:
@@ -856,6 +856,8 @@ class MessageToStrTestCase(unittest.TestCase):
|
||||
def setUp(self) -> None:
|
||||
self.message = Message(Question('This is a question.'),
|
||||
Answer('This is an answer.'),
|
||||
ai=('FakeAI'),
|
||||
model=('FakeModel'),
|
||||
tags={Tag('atag1'), Tag('btag2')},
|
||||
file_path=pathlib.Path('/tmp/foo/bla'))
|
||||
|
||||
@@ -869,11 +871,13 @@ This is an answer."""
|
||||
def test_to_str_with_tags_and_file(self) -> None:
|
||||
expected_output = f"""{TagLine.prefix} atag1 btag2
|
||||
FILE: /tmp/foo/bla
|
||||
AI: FakeAI
|
||||
MODEL: FakeModel
|
||||
{Question.txt_header}
|
||||
This is a question.
|
||||
{Answer.txt_header}
|
||||
This is an answer."""
|
||||
self.assertEqual(self.message.to_str(with_tags=True, with_file=True), expected_output)
|
||||
self.assertEqual(self.message.to_str(with_metadata=True), expected_output)
|
||||
|
||||
|
||||
class MessageRmFileTestCase(unittest.TestCase):
|
||||
|
||||
Reference in New Issue
Block a user