i am working on a project which is adding support for Django 3.0. While doing so, I came across ticket # 30400
https://code.djangoproject.com/ticket/30400 after which contractions were rewritten. I am writing a test which should work with both Django 3.0 and 2.2. I have to assert error_messages in django.contrib.auth.forms.SetPasswordForm like below
self.assertIn("The two password fields didn’t match.", str(response.data['new_password2']))
How can I make this work in both versions of Django ?
Thanks and Regards,
Gagan Deep