Beispiel #1
0
 def testAddParagraph(self):
     entry = raw_doc.RawEntry(self.tok)
     self.assertEqual(entry.body, raw_doc.RawBody())
     p = raw_doc.RawParagraph(self.tok)
     entry.addParagraph(p)
     b = raw_doc.RawBody()
     b.addParagraph(p)
     self.assertEqual(entry.body, b)
Beispiel #2
0
 def testInitialization(self):
     entry = raw_doc.RawEntry(self.tok)
     self.assertEqual(entry.name.text, raw_doc.RawText().text)
     self.assertEqual(len(entry.briefs), 0)
     self.assertEqual(entry.body, raw_doc.RawBody())
     self.assertEqual(entry.sees, [])
     self.assertEqual(entry.command, '<entry>')
Beispiel #3
0
 def testGetFormatted(self):
     body = raw_doc.RawBody()
     body.addParagraph(self.p)
     self.assertEqual(body.getFormatted(self.formatter), 'aword\n')
Beispiel #4
0
 def testCreation(self):
     body = raw_doc.RawBody()
     self.assertEqual(body.paragraphs, [])
     body.addParagraph(self.p)
     self.assertEqual(body.paragraphs, [self.p])