def test_passwordsuccess(self):
     """ Check to ensure the password, when proper, is successful."""
     form_data = {
         'username': '******',
         'password1': '2$n5[]$nnA5Y}2}}^gba',
         'password2': '2$n5[]$nnA5Y}2}}^gba'
     }
     form = StrictUserCreationForm(data=form_data)
     self.assertTrue(form.is_valid())
 def test_specialchar(self):
     """ Check to ensure the password contains a special character."""
     form_data = {
         'username': '******',
         'password1': 'vNzwXpzKJyTshvHsuULn',
         'password2': 'vNzwXpzKJyTshvHsuULn'
     }
     form = StrictUserCreationForm(data=form_data)
     self.assertFalse(form.is_valid())
 def test_length(self):
     """ Check to ensure the password is 20 characters long."""
     form_data = {
         'username': '******',
         'password1': 'c897B$eH@',
         'password2': 'c897B$eH@'
     }
     form = StrictUserCreationForm(data=form_data)
     self.assertFalse(form.is_valid())
 def test_number(self):
     """ Check to ensure the password contains a number."""
     form_data = {
         'username': '******',
         'password1': 'CDr=cpz&Z&a!cuP-nAQe',
         'password2': 'CDr=cpz&Z&a!cuP-nAQe'
     }
     form = StrictUserCreationForm(data=form_data)
     self.assertFalse(form.is_valid())
 def test_lowercase(self):
     """ Check to ensure the password contains a lowercase letter."""
     form_data = {
         'username': '******',
         'password1': 'A=R7-%=K?K@B^!9Q8=C+',
         'password2': 'A=R7-%=K?K@B^!9Q8=C+'
     }
     form = StrictUserCreationForm(data=form_data)
     self.assertFalse(form.is_valid())
 def test_uppercase(self):
     """ Check to ensure the password contains an uppercase letter."""
     form_data = {
         'username': '******',
         'password1': 'q*9x=^2hg&v7u?u9tg?u',
         'password2': 'q*9x=^2hg&v7u?u9tg?u'
     }
     form = StrictUserCreationForm(data=form_data)
     self.assertFalse(form.is_valid())
 def test_match(self):
     """ Check to ensure the passwords match."""
     form_data = {
         'username': '******',
         'password1': 'q*A9x=^2hg&v7u?u9tg?u',
         'password2': 'A=r7-%=K?K@B^!9Q8=C+'
     }
     form = StrictUserCreationForm(data=form_data)
     self.assertFalse(form.is_valid())
 def test_blank(self):
     """ Check to ensure the password cannot be blank."""
     form_data = {
         'username': '******',
         'password1': '',
         'password2': ''
     }
     form = StrictUserCreationForm(data=form_data)
     self.assertFalse(form.is_valid())
Exemplo n.º 9
0
 def test_blank(self):
     """ Check to ensure the password cannot be blank."""
     form_data = {"username": "******", "password1": "", "password2": ""}
     form = StrictUserCreationForm(data=form_data)
     self.assertFalse(form.is_valid())
Exemplo n.º 10
0
 def test_passwordsuccess(self):
     """ Check to ensure the password, when proper, is successful."""
     form_data = {"username": "******", "password1": "2$n5[]$nnA5Y}2}}^gba", "password2": "2$n5[]$nnA5Y}2}}^gba"}
     form = StrictUserCreationForm(data=form_data)
     self.assertTrue(form.is_valid())
Exemplo n.º 11
0
 def test_length(self):
     """ Check to ensure the password is 20 characters long."""
     form_data = {"username": "******", "password1": "c897B$eH@", "password2": "c897B$eH@"}
     form = StrictUserCreationForm(data=form_data)
     self.assertFalse(form.is_valid())
Exemplo n.º 12
0
 def test_specialchar(self):
     """ Check to ensure the password contains a special character."""
     form_data = {"username": "******", "password1": "vNzwXpzKJyTshvHsuULn", "password2": "vNzwXpzKJyTshvHsuULn"}
     form = StrictUserCreationForm(data=form_data)
     self.assertFalse(form.is_valid())
Exemplo n.º 13
0
 def test_number(self):
     """ Check to ensure the password contains a number."""
     form_data = {"username": "******", "password1": "CDr=cpz&Z&a!cuP-nAQe", "password2": "CDr=cpz&Z&a!cuP-nAQe"}
     form = StrictUserCreationForm(data=form_data)
     self.assertFalse(form.is_valid())
Exemplo n.º 14
0
 def test_lowercase(self):
     """ Check to ensure the password contains a lowercase letter."""
     form_data = {"username": "******", "password1": "A=R7-%=K?K@B^!9Q8=C+", "password2": "A=R7-%=K?K@B^!9Q8=C+"}
     form = StrictUserCreationForm(data=form_data)
     self.assertFalse(form.is_valid())
Exemplo n.º 15
0
 def test_uppercase(self):
     """ Check to ensure the password contains an uppercase letter."""
     form_data = {"username": "******", "password1": "q*9x=^2hg&v7u?u9tg?u", "password2": "q*9x=^2hg&v7u?u9tg?u"}
     form = StrictUserCreationForm(data=form_data)
     self.assertFalse(form.is_valid())
Exemplo n.º 16
0
 def test_match(self):
     """ Check to ensure the passwords match."""
     form_data = {"username": "******", "password1": "q*A9x=^2hg&v7u?u9tg?u", "password2": "A=r7-%=K?K@B^!9Q8=C+"}
     form = StrictUserCreationForm(data=form_data)
     self.assertFalse(form.is_valid())