~diegosarmentero/ubuntu-sso-client/err-dict

« back to all changes in this revision

Viewing changes to ubuntu_sso/utils/tests/test_ui.py

Added the way to reset the password.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
from unittest import TestCase
20
20
 
21
21
from ubuntu_sso.utils.ui import (get_password_strength,
22
 
                                 is_min_required_password)
 
22
                                 is_min_required_password,
 
23
                                 is_correct_email)
23
24
 
24
25
 
25
26
class GetPasswordStrengTestCase(TestCase):
108
109
        """Test a password that is correct."""
109
110
        password = 'TodasLasPaswordPasan88'
110
111
        self.assertTrue(is_min_required_password(password))
 
112
 
 
113
 
 
114
class IsCorrectEmailAddress(TestCase):
 
115
    """Test the is_correct_email funtion."""
 
116
 
 
117
    def test_is_correct_email_true(self):
 
118
        """Test when the email is correct."""
 
119
        email = 'manuel@canonical.com'
 
120
        self.assertTrue(is_correct_email(email))
 
121
 
 
122
    def test_is_correct_email_false(self):
 
123
        """Test when the email is not correct."""
 
124
        email = 'manuelcanonical.com'
 
125
        self.assertFalse(is_correct_email(email))