Пример #1
0
    def test_check_email_not_ok(self):
        email = ' Rafael@[email protected]    '
        try:
            email = SFNL.check_email(email)
            raise AssertionError()
        except Exception as invalid:
            print(invalid)

        email = ' Rafael Aguilher da Costa <rafael@[email protected]>'
        try:
            email = SFNL.check_email(email)
            raise AssertionError()
        except Exception as invalid:
            print(invalid)

        email = ' Rafael Aguilher da Costa <rafael.aguilher.gmail.com>'
        try:
            email = SFNL.check_email(email)
            raise AssertionError()
        except Exception as invalid:
            print(invalid)

        email = ' @Rafael Aguilher da Costa <*****@*****.**>'
        try:
            email = SFNL.check_email(email)
            raise AssertionError()
        except Exception as invalid:
            print(invalid)
Пример #2
0
    def test_check_email_ok(self):
        email = ' [email protected]    '
        email = SFNL.check_email(email)
        assert (email == '*****@*****.**')

        email = ' Rafael Aguilher da Costa <*****@*****.**>'
        email = SFNL.check_email(email)
        assert (email == '*****@*****.**')

        email = ' 1234Rafael Aguilher da Costa <*****@*****.**>'
        email = SFNL.check_email(email)
        assert (email == '*****@*****.**')