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]")
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]")
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 !" )
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 !")