Ejemplo n.º 1
0
 def test_password_change_correct(self):
     form_data = {
         'old_password': '******',
         'new_password': '******',
         'confirm_password': '******',
     }
     form = ProfilePasswordChangeForm(data=form_data, )
     self.assertEqual(form.is_valid(), True)
Ejemplo n.º 2
0
 def test_password_change_incorrect(self):
     form_data = {
         'old_password': '******',
         'new_password': '******',
         'confirm_password': '******',
     }
     form = ProfilePasswordChangeForm(data=form_data, )
     self.assertEqual(form.is_valid(), False)
Ejemplo n.º 3
0
 def test_password_change_correct(self):
     form_data = {
         'old_password': '******',
         'new_password': '******',
         'confirm_password': '******',
     }
     form = ProfilePasswordChangeForm(
         data=form_data,
     )
     self.assertEqual(form.is_valid(), True)
Ejemplo n.º 4
0
 def test_password_change_incorrect(self):
     form_data = {
         'old_password': '******',
         'new_password': '******',
         'confirm_password': '******',
     }
     form = ProfilePasswordChangeForm(
         data=form_data,
     )
     self.assertEqual(form.is_valid(), False)
def default_forms(request):
    return {
        'registration_form': RegistrationForm(),
        'edit_profile_form': EditProfileForm(),
        'password_change_form': ProfilePasswordChangeForm()
    }