Beispiel #1
0
 def test_username_validity(self):
     user = User.objects.get(username='******')
     data = {'username': '******'}
     form = UserChangeForm(data, instance=user)
     self.assertFalse(form.is_valid())
     self.assertEqual(form['username'].errors,
                      [force_text(form.fields['username'].error_messages['invalid'])])
Beispiel #2
0
 def test_bug_17944_unknown_password_algorithm(self):
     user = User.objects.get(username='******')
     form = UserChangeForm(instance=user)
     # Just check that no error is raised.
     form.as_table()
Beispiel #3
0
 def test_bug_17944_empty_password(self):
     user = User.objects.get(username='******')
     form = UserChangeForm(instance=user)
     # Just check that no error is raised.
     form.as_table()