revsys / django-test-plus

Useful additions to Django's default TestCase
https://django-test-plus.readthedocs.io
BSD 3-Clause "New" or "Revised" License
612 stars 62 forks source link

Version 2.2.2 breaks tests that depend on email addresses for users #206

Closed epicserve closed 3 months ago

epicserve commented 1 year ago

In version 2.2.1, self.make_user() would create a user with the username testuser and the email address testuser@example.com. Now the user is created without an email address. If you look at the diff you'll see where this behavior happens.

image

Line 271 in version 2.2.1 is where the email address is added. However, in the new version, this isn't added to the user, and there isn't a setting that I can see to make it have this same behavior. I feel like this should be reverted and added back in version 2.3 since this is a breaking change or make a patch where the default is to create users with emails and then either programmatically determine if the email field is missing from the model and not add the email or make a setting where you can choose not to add an email.

frankwiles commented 3 months ago

Note this issue was actually resolved last year, just didn't get closed.