Пример #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')