예제 #1
0
 def test_text_between(self):
     expected = 'Something'
     result = Utils.text_between(self.s, '<a href="#">', '</a>')
     result_force_html = Utils.text_between(self.s, '<a', '/a', True)
     self.assertEqual(expected, result)
     self.assertEqual(expected, result_force_html)
예제 #2
0
 def test_text_between_not_found(self):
     expected = self.s
     result = Utils.text_between(self.s, '<h1>', '</h1>')
     result_force_html = Utils.text_between(self.s, '<h1', '/h1', True)
     self.assertEqual(expected, result)
     self.assertEqual(expected, result_force_html)
예제 #3
0
 def test_text_between(self):
     expected = 'Something'
     result = Utils.text_between(self.s, '<a href="#">', '</a>')
     result_force_html = Utils.text_between(self.s, '<a', '/a', True)
     self.assertEqual(expected, result)
     self.assertEqual(expected, result_force_html)