예제 #1
0
 def testCleanBodyRegularString(self):
     s = 'Hello'
     self.assertEqual(email_sender.clean_body(s), 'Hello')
예제 #2
0
 def testCleanBody(self):
     s = '<h1>Hello</h1>'
     self.assertEqual(email_sender.clean_body(s), 'Hello')
예제 #3
0
 def testCleanBodyRandomString2(self):
     s = '<script<script>>alert("Hi!")<</script>/script>'
     self.assertEqual(email_sender.clean_body(s), '>alert("Hi!")/script>')
예제 #4
0
 def testCleanBodyRandomString(self):
     s = '<<<<<<<<<<<<<<>Hello'
     self.assertEqual(email_sender.clean_body(s), 'Hello')
예제 #5
0
 def testCleanBodyHrefAttributes(self):
     s = '<a id="foo">Hello</a>'
     self.assertEqual(email_sender.clean_body(s), 'Hello')
예제 #6
0
 def testCleanBodyConsecutiveHTMLTags(self):
     s = '<a><b><c>Hello</a></b></c>'
     self.assertEqual(email_sender.clean_body(s), 'Hello')