'This makes sure the proper asserts on password policy also works on password reset'

@patch.dict('django.conf.settings.FEATURES', {'ENFORCE_PASSWORD_POLICY': True})
@override_settings(PASSWORD_MIN_LENGTH=6)
def test_password_policy_on_password_reset(self):

    (staff_email, _) = self._setup_user(is_staff=True, password='foofoo')
    success_msg = 'Your    Password    Reset    is    Complete'
    user = User.objects.get(email=staff_email)
    token = default_token_generator.make_token(user)
    uidb36 = int_to_base36(user.id)
    resp = self.client.post('/password_reset_confirm/{0}-{1}/'.format(uidb36, token), {'new_password1': 'foo', 'new_password2': 'foo'}, follow=True)
    self.assertNotIn(success_msg, resp.content)
    user = User.objects.get(email=staff_email)
    token = default_token_generator.make_token(user)
    uidb36 = int_to_base36(user.id)
    resp = self.client.post('/password_reset_confirm/{0}-{1}/'.format(uidb36, token), {'new_password1': 'foofoo', 'new_password2': 'foofoo'}, follow=True)
    self.assertIn(success_msg, resp.content)
