Exemplo n.º 1
0
def test_multiple_methods_chaining():
    t1 = "This is the mail [email protected] ,our WEBSITE is https://example.com 😊 and it will cost $100 to subscribe."
    docx = TextCleaner(t1)
    result = docx.remove_emails().remove_urls().remove_emojis()
    assert str(
        result
    ) == 'This is the mail  ,our WEBSITE is   and it will cost $100 to subscribe.'
Exemplo n.º 2
0
def test_remove_emails():
    docx = TextCleaner()
    docx.text = "This is the mail [email protected] ,our WEBSITE is https://example.com 😊."
    result = docx.remove_emails()
    assert str(
        result) == 'This is the mail  ,our WEBSITE is https://example.com 😊.'