Ejemplo n.º 1
0
    def test_extract_without_domain_and_brackets(self):
        text = "Some text bewtween brackets ([email protected])"
        self.assertEqual("*****@*****.**", extract_email(text))

        text = "Some text start with bracket ([email protected]"
        self.assertEqual("*****@*****.**", extract_email(text))

        text = "Some text bewtween brackets {[email protected]}"
        self.assertEqual("*****@*****.**", extract_email(text))

        text = "Some text bewtween brackets [[email protected]]"
        self.assertEqual("*****@*****.**", extract_email(text))
Ejemplo n.º 2
0
    def test_extract_without_domain_and_brackets(self):
        text = 'Some text bewtween brackets ([email protected])'
        self.assertEqual('*****@*****.**', extract_email(text))

        text = 'Some text start with bracket ([email protected]'
        self.assertEqual('*****@*****.**', extract_email(text))

        text = 'Some text bewtween brackets {[email protected]}'
        self.assertEqual('*****@*****.**', extract_email(text))

        text = 'Some text bewtween brackets [[email protected]]'
        self.assertEqual('*****@*****.**', extract_email(text))
Ejemplo n.º 3
0
    def test_extract_email_without_domain(self):
        text = "Some text [email protected]"
        self.assertEqual("*****@*****.**", extract_email(text))

        text = "Some text [email protected] with something at the end"
        self.assertEqual("*****@*****.**", extract_email(text))

        # Finds first email
        text = "Some text [email protected] with something at the" "end and other email like [email protected]"
        self.assertEqual("*****@*****.**", extract_email(text))

        text = "[email protected] at the begginning"
        self.assertEqual("*****@*****.**", extract_email(text))
Ejemplo n.º 4
0
    def test_extract_email_without_domain(self):
        text = 'Some text [email protected]'
        self.assertEqual('*****@*****.**', extract_email(text))

        text = 'Some text [email protected] with something at the end'
        self.assertEqual('*****@*****.**', extract_email(text))

        # Finds first email
        text = ('Some text [email protected] with something at the'
                'end and other email like [email protected]')
        self.assertEqual('*****@*****.**', extract_email(text))

        text = '[email protected] at the begginning'
        self.assertEqual('*****@*****.**', extract_email(text))
Ejemplo n.º 5
0
    def test_extract_email(self):
        text = "Some text [email protected]"
        self.assertEqual("*****@*****.**", extract_email(text, "example.com"))

        text = "Some text [email protected] with something at the end"
        self.assertEqual("*****@*****.**", extract_email(text, "example.com"))

        text = "Some text [email protected] with something at the" "end and other email like [email protected]"
        self.assertEqual("*****@*****.**", extract_email(text, "example.com"))

        text = "Some text [email protected] with something at the" "end and other email like [email protected]"
        self.assertEqual("*****@*****.**", extract_email(text, "example.net"))

        text = "[email protected] at the begginning"
        self.assertEqual("*****@*****.**", extract_email(text, "example.com"))
Ejemplo n.º 6
0
    def test_extract_email(self):
        text = 'Some text [email protected]'
        self.assertEqual('*****@*****.**',
                         extract_email(text, 'example.com'))

        text = 'Some text [email protected] with something at the end'
        self.assertEqual('*****@*****.**',
                         extract_email(text, 'example.com'))

        text = ('Some text [email protected] with something at the'
                'end and other email like [email protected]')
        self.assertEqual('*****@*****.**',
                         extract_email(text, 'example.com'))

        text = ('Some text [email protected] with something at the'
                'end and other email like [email protected]')
        self.assertEqual('*****@*****.**',
                         extract_email(text, 'example.net'))

        text = '[email protected] at the begginning'
        self.assertEqual('*****@*****.**',
                         extract_email(text, 'example.com'))