Skip to content

Commit

Permalink
ajout d'un nouveau test our member
Browse files Browse the repository at this point in the history
  • Loading branch information
Eskimon committed Aug 3, 2014
1 parent 2fca311 commit f63834d
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions zds/member/tests/tests_forms.py
Expand Up @@ -171,6 +171,17 @@ def test_email_exist_register_form(self):
}
form = RegisterForm(data=data)
self.assertFalse(form.is_valid())

def test_pseudo_espaces_register_form(self):
testuser = ProfileFactory()
data = {
'email': 'test@gmail.com',
'username': ' ZeTester ',
'password': 'ZePassword',
'password_confirm': 'ZePassword'
}
form = RegisterForm(data=data)
self.assertFalse(form.is_valid())


class MiniProfileFormTest(TestCase):
Expand Down Expand Up @@ -311,6 +322,14 @@ def test_wrong_email_user_form(self):
form = ChangeUserForm(data=data)
self.assertFalse(form.is_valid())

def test_pseudo_espaces_register_form(self):
testuser = ProfileFactory()
data = {
'username_new': ' ZeTester ',
'email_new': ''
}
form = ChangeUserForm(data=data)
self.assertFalse(form.is_valid())

class ChangePasswordFormTest(TestCase):
""" Check the form to change the password """
Expand Down

0 comments on commit f63834d

Please sign in to comment.