Refactor message.Answer class in a way, that it can be constructed dynamically step by step, in preparation of using streaming API.
This commit is contained in:
@@ -91,7 +91,7 @@ class QuestionTestCase(unittest.TestCase):
|
||||
class AnswerTestCase(unittest.TestCase):
|
||||
def test_answer_with_header(self) -> None:
|
||||
with self.assertRaises(MessageError):
|
||||
Answer(f"{Answer.txt_header}\nno")
|
||||
str(Answer(f"{Answer.txt_header}\nno"))
|
||||
|
||||
def test_answer_with_legal_header(self) -> None:
|
||||
answer = Answer(f"This is a line contaning '{Answer.txt_header}'\nIt is what it is.")
|
||||
|
||||
Reference in New Issue
Block a user