Beispiel #1
0
 def test_url_replace(self):
     args = self.parser.parse_args("-i corpus/multipart.eml".split())
     msg = email_open(args)
     for part in msg.walk():
         if not part.is_multipart() and part.get_content_maintype(
         ) == 'text':
             self.assertNotRegex(url_replace(part.get_payload()), "\=[^x]")
Beispiel #2
0
	def test_url_replace(self):
		args = self.parser.parse_args("-i corpus/multipart.eml".split())
		msg = email_open(args)
		for part in msg.walk():
			if not part.is_multipart() and part.get_content_maintype() == 'text':
				self.assertNotRegex(
					url_replace(part.get_payload()),
					"\=[^x]")
Beispiel #3
0
    def test_url_replace(self):

        self.assertEqual(
            url_replace(
                "Look what I found: https://encrypted.google.com/search?hl=fr&q=love%20your%20email !"
            ),
            "Look what I found: https://encrypted.google.com/search?hl=xx&q=xxxx+xxxx+xxxxx !"
        )
Beispiel #4
0
	def test_url_replace(self):
 
                self.assertEqual(
                        url_replace("Look what I found: https://encrypted.google.com/search?hl=fr&q=love%20your%20email !"),
                        "Look what I found: https://encrypted.google.com/search?hl=xx&q=xxxx+xxxx+xxxxx !")