예제 #1
0
 def test_para_iterable(self):
     rtn = text(['para 1', 'para 2'], para=True, classes='class_1', style='style_1')
     self.assertEqual(rtn, '<p class="class_1" style="style_1">para 1</p>'
                           '<p class="class_1" style="style_1">para 2</p>')
예제 #2
0
 def test_classes_and_style(self):
     rtn = text('some string', classes='class_1 class_2', style='style_1')
     self.assertEqual(rtn, '<span class="class_1 class_2" style="style_1">some string</span>')
예제 #3
0
 def test_para_with_classes_and_style(self):
     rtn = text('some string', para=True, classes='class_1 class_2', style='style_1')
     self.assertEqual(rtn, '<p class="class_1 class_2" style="style_1">some string</p>')
예제 #4
0
 def test_para(self):
     rtn = text('some string', para=True)
     self.assertEqual(rtn, '<p class="" style="">some string</p>')
예제 #5
0
 def test_list(self):
     rtn = text(('string 1', ' string 2'))
     self.assertEqual(rtn, 'string 1 string 2')
     rtn = text(['string 1', ' string 2'])
     self.assertEqual(rtn, 'string 1 string 2')
예제 #6
0
 def test_simple_case(self):
     rtn = text('some text')
     self.assertEqual(rtn, 'some text')