Beispiel #1
0
 def test_filters_empty_option(self):
     content = ""
     output = format_option(content)
     self.assertEquals(output, u'')
Beispiel #2
0
 def test_unicode_input(self):
     content = u'Zoë'
     output = format_option(content)
     self.assertEquals(output, u'Zoë')
Beispiel #3
0
 def test_format_option(self):
     content = "<b>Test</b><p></p><img/>"
     output = format_option(content)
     self.assertEquals(output, u'<b>Test</b><br/><img style="'
                               u'vertical-align:middle"/>')
Beispiel #4
0
 def test_format_option_double_image(self):
     content = "<img/><img/>"
     result = format_option(content)
     self.assertEquals(result, u'<img style="vertical-align:middle"/>'
                               u'<img style="vertical-align:middle"/>')
Beispiel #5
0
 def test_format_option_text_and_image(self):
     content = "<b>Test</b><img/>"
     result = format_option(content)
     self.assertEquals(result, u'<b>Test</b><img style='
                               u'"vertical-align:middle"/>')
Beispiel #6
0
 def test_format_option_text_only(self):
     content = "Test"
     result = format_option(content)
     self.assertEquals(result,u'Test')
Beispiel #7
0
 def test_align_image_only(self):
     content = "<img/>"
     result = format_option(content)
     self.assertEquals(result, u'<img style="vertical-align:middle"/>')