Compare commits

..

2 Commits

Author SHA1 Message Date
a47094f1d9 added new module 'chat.py' 2023-08-26 11:03:56 +02:00
2ca4e45f4a tests: added testcases for Message.from/to_file() and others 2023-08-26 11:03:56 +02:00

View File

@ -600,18 +600,15 @@ class MessageIDTestCase(CmmTestCase):
class MessageHashTestCase(CmmTestCase):
def setUp(self) -> None:
self.message1 = Message(Question('This is a question.'),
tags={Tag('tag1')},
file_path=pathlib.Path('/tmp/foo/bla'))
self.message2 = Message(Question('This is a new question.'),
file_path=pathlib.Path('/tmp/foo/bla'))
self.message3 = Message(Question('This is a question.'),
Answer('This is an answer.'),
file_path=pathlib.Path('/tmp/foo/bla'))
# message4 is a copy of message1, because only question and
# answer are used for hashing and comparison
# message4 is a copy of message1, because 'file_path'
# is ignored for hashing and comparison
self.message4 = Message(Question('This is a question.'),
tags={Tag('tag1'), Tag('tag2')},
ai='Blabla',
file_path=pathlib.Path('foobla'))
def test_set_hashing(self) -> None: