Exemplo n.º 1
0
 def test_emails_regex(self):
     test_file = self.get_test_loc('finder/email/3w-xxxx.c')
     test_input = open(test_file).read()
     expected = [
         u'*****@*****.**', u'*****@*****.**', u'*****@*****.**',
         u'*****@*****.**', u'*****@*****.**', u'*****@*****.**',
         u'*****@*****.**'
     ]
     result = re.findall(finder.emails_regex(), test_input)
     assert expected == result
Exemplo n.º 2
0
 def test_emails_regex(self):
     test_file = self.get_test_loc('finder/email/3w-xxxx.c')
     test_input = open(test_file).read()
     expected = [u'*****@*****.**',
                 u'*****@*****.**',
                 u'*****@*****.**',
                 u'*****@*****.**',
                 u'*****@*****.**',
                 u'*****@*****.**',
                 u'*****@*****.**']
     result = re.findall(finder.emails_regex(), test_input)
     assert expected == result