Exemplo n.º 1
0
 def test_replace_special_characters(self):
     aa = ElyxerEntry()
     body = "<code>   SOME CODE   </code>"
     body += "Footnotes:  [→    →] "
     aa._Entry__body = body
     aa._Entry__replace_special_characters()
     self.assertTrue('<code>' in aa.get_body())
     self.assertTrue('</code>' in aa.get_body())
     self.assertTrue('→' not in aa.get_body())
Exemplo n.º 2
0
 def test_replace_special_characters(self):
     aa = ElyxerEntry()
     body = "&lt;code&gt;   SOME CODE   &lt;/code&gt;"
     body +="Footnotes:  [→    →] "
     aa._Entry__body = body
     aa._Entry__replace_special_characters()
     self.assertTrue('<code>' in aa.get_body())
     self.assertTrue('</code>' in aa.get_body())
     self.assertTrue('→' not in aa.get_body())
Exemplo n.º 3
0
 def test_print_entry_summary(self):
     entry = ElyxerEntry()
     entry._Entry__images = [Image("<img src='photo.jpg' />")]
     entry._Entry__title = 'my title'
     entry._Entry__body = 'fine, fine day'
     returned = self.display.print_entry_summary(entry)
     expected = "You are about to publish:\n\n    my title\n      3 words\n      1 image\n"
     print '**************************************************************'
     print returned
     print expected
     self.assertEqual(returned, expected)
Exemplo n.º 4
0
 def test_print_entry_summary(self):
     entry = ElyxerEntry()
     entry._Entry__images = [Image("<img src='photo.jpg' />")]
     entry._Entry__title = 'my title'
     entry._Entry__body = 'fine, fine day'
     returned = self.display.print_entry_summary(entry)
     expected = "You are about to publish:\n\n    my title\n      3 words\n      1 image\n"
     print '**************************************************************'
     print returned
     print expected
     self.assertEqual(returned, expected)
Exemplo n.º 5
0
 def test_get_num_words(self):
     aa = ElyxerEntry()
     aa._Entry__body = '<b> </b> three more lines'
     self.assertEqual(aa.get_num_words(), 3)
Exemplo n.º 6
0
 def test_get_num_words(self):
     aa = ElyxerEntry()
     aa._Entry__body = '<b> </b> three more lines'
     self.assertEqual(aa.get_num_words(), 3)