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'])])
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()
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()