mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-22 17:47:08 +03:00
Make test_docker.sh tests pass by passing new password auth rules
This commit is contained in:
parent
6c0cb7ed72
commit
6cbc513e6d
0
tests/test_cookiecutter_generation.py
Normal file → Executable file
0
tests/test_cookiecutter_generation.py
Normal file → Executable file
0
tests/test_docker.sh
Normal file → Executable file
0
tests/test_docker.sh
Normal file → Executable file
|
@ -6,14 +6,14 @@ from ..admin import MyUserCreationForm
|
||||||
class TestMyUserCreationForm(TestCase):
|
class TestMyUserCreationForm(TestCase):
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.user = self.make_user()
|
self.user = self.make_user('notalamode', 'notalamodespassword')
|
||||||
|
|
||||||
def test_clean_username_success(self):
|
def test_clean_username_success(self):
|
||||||
# Instantiate the form with a new username
|
# Instantiate the form with a new username
|
||||||
form = MyUserCreationForm({
|
form = MyUserCreationForm({
|
||||||
'username': 'alamode',
|
'username': 'alamode',
|
||||||
'password1': '123456',
|
'password1': '7jefB#f@Cc7YJB]2v',
|
||||||
'password2': '123456',
|
'password2': '7jefB#f@Cc7YJB]2v',
|
||||||
})
|
})
|
||||||
# Run is_valid() to trigger the validation
|
# Run is_valid() to trigger the validation
|
||||||
valid = form.is_valid()
|
valid = form.is_valid()
|
||||||
|
@ -27,8 +27,8 @@ class TestMyUserCreationForm(TestCase):
|
||||||
# Instantiate the form with the same username as self.user
|
# Instantiate the form with the same username as self.user
|
||||||
form = MyUserCreationForm({
|
form = MyUserCreationForm({
|
||||||
'username': self.user.username,
|
'username': self.user.username,
|
||||||
'password1': '123456',
|
'password1': 'notalamodespassword',
|
||||||
'password2': '123456',
|
'password2': 'notalamodespassword',
|
||||||
})
|
})
|
||||||
# Run is_valid() to trigger the validation, which is going to fail
|
# Run is_valid() to trigger the validation, which is going to fail
|
||||||
# because the username is already taken
|
# because the username is already taken
|
||||||
|
|
Loading…
Reference in New Issue
Block a user