def test_gets_emails_from_html_realworld(): html = full_page.FULL_PAGE soup = BeautifulSoup(html, 'html.parser') html_txt = soup.get_text() emails = extract_from_text(EMAIL_REGEX, html_txt) return emails
def extract_email_text(self, html): for email in extract_from_text(EMAIL_REGEX, html): yield email
def test_gets_emails_from_html_text_simple(): html = html_pages.PAGE_ONE soup = BeautifulSoup(html, 'html.parser') html_txt = soup.get_text() emails = extract_from_text(EMAIL_REGEX, html_txt) assert len(emails) == 2