0001-tests-add-test-on-creation-of-user-without-email-430.patch
tests/test_user_manager.py | ||
---|---|---|
14 | 14 |
# |
15 | 15 |
# You should have received a copy of the GNU Affero General Public License |
16 | 16 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | ||
18 |
from __future__ import unicode_literals |
|
19 | ||
17 | 20 |
import csv |
18 | 21 |
import re |
19 | 22 |
import time |
... | ... | |
42 | 45 |
return set(elt.text for elt in response.pyquery('td.username')) |
43 | 46 | |
44 | 47 | |
48 |
def test_create_user_no_email(app, superuser): |
|
49 |
response = login(app, superuser, '/manage/users/') |
|
50 |
response = response.click('Add user') |
|
51 |
assert User.objects.count() == 1 |
|
52 |
response.form.set('first_name', 'Jôhn') |
|
53 |
response.form.set('last_name', 'Döe') |
|
54 |
response.form.set('password1', '1234Password') |
|
55 |
response.form.set('password2', '1234Password') |
|
56 |
response.form.set('send_password_reset', False) |
|
57 |
response = response.form.submit(status=302) |
|
58 |
assert User.objects.count() == 2 |
|
59 | ||
60 | ||
45 | 61 |
def test_manager_user_change_email(app, superuser_or_admin, simple_user, mailoutbox): |
46 | 62 |
ou = get_default_ou() |
47 | 63 |
ou.validate_emails = True |
48 |
- |