コード例 #1
0
ファイル: strip_tag.py プロジェクト: tahmidMahmud/indiePrep
	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')
コード例 #2
0
ファイル: strip_tag.py プロジェクト: tahmidMahmud/indiePrep
	def test_twoStringAllowOtherTags(self):
		tagless = strip_tags('<p>hello</p><a>Goodbye</a>', '<a>')

		self.assertEqual(tagless, 'hello<a>Goodbye</a>')
コード例 #3
0
ファイル: strip_tag.py プロジェクト: tahmidMahmud/indiePrep
	def test_StringAllowableTags(self):
		tagless = strip_tags('<p>hello</p>', '<p>')

		self.assertEqual(tagless, '<p>hello</p>')
コード例 #4
0
ファイル: strip_tag.py プロジェクト: tahmidMahmud/indiePrep
	def test_twoStringInsideTags(self):
		tagless = strip_tags('<p>hello</p><a>Goodbye</a>')

		self.assertEqual(tagless, 'helloGoodbye')
コード例 #5
0
ファイル: strip_tag.py プロジェクト: tahmidMahmud/indiePrep
	def test_StringInsideTags(self):
		tagless = strip_tags('<p>hello</p>')

		self.assertEqual(tagless, 'hello')
コード例 #6
0
ファイル: strip_tag.py プロジェクト: tahmidMahmud/indiePrep
	def test_StringWithNoTags(self):
		tagless = strip_tags('hello')

		self.assertEqual(tagless, 'hello')