Esempio n. 1
0
	def test_Allow2tagsBlock1tag(self):
		tagless = strip_tags('<p>hello</p><a>Goodbye</a><c>Goodbye</c>', '<p><a>')

		self.assertEqual(tagless, '<p>hello</p><a>Goodbye</a>Goodbye')
Esempio n. 2
0
	def test_twoStringAllowOtherTags(self):
		tagless = strip_tags('<p>hello</p><a>Goodbye</a>', '<a>')

		self.assertEqual(tagless, 'hello<a>Goodbye</a>')
Esempio n. 3
0
	def test_StringAllowableTags(self):
		tagless = strip_tags('<p>hello</p>', '<p>')

		self.assertEqual(tagless, '<p>hello</p>')
Esempio n. 4
0
	def test_twoStringInsideTags(self):
		tagless = strip_tags('<p>hello</p><a>Goodbye</a>')

		self.assertEqual(tagless, 'helloGoodbye')
Esempio n. 5
0
	def test_StringInsideTags(self):
		tagless = strip_tags('<p>hello</p>')

		self.assertEqual(tagless, 'hello')
Esempio n. 6
0
	def test_StringWithNoTags(self):
		tagless = strip_tags('hello')

		self.assertEqual(tagless, 'hello')