Hi Valery, We don't currently ship an integration test to validate your custom User model, for two reasons:
1) The requirements for a User model depends on what features you're using - the core requirements are listed in the docs, but depending on exactly what you're doing with the User model, there might be other integration requirements. 2) We haven't got a good way to distribute a test suite for a model that we haven't defined. That said, the baked in test suite in django.contrib.auth does test a number of tests to ensure that custom User models work; if you're looking for a starting point, that suite might be a good starting point. Any test that isn't marked @skipIfCustomUser needs to pass regardless of the user model. Tests labelled @override_settings(AUTH_USER_MODEL='auth.ExtensionUser') are tests for specific user models, which will give you an idea of the sort of tests you might need to add for your own model. I hope that helps. If, as a result of doing this, you end up with a template for a good set of integration tests for a custom model, this would be a good contribution back to the community - a "template" project for a custom User model app that others can fork and modify as required would be one way for Django to distribute an integration test suite. Yours, Russ Magee %-) On Fri, Oct 10, 2014 at 4:24 PM, Valery Melou <valeryme...@gmail.com> wrote: > Hi everybody. > I'm creating a custom auth user model to remove 'first_name' and > 'last_name' attributes from the default one and to make the 'email' field > required and unique. I would like to know which tests I'm supposed to write > to make sure that my model support each feature of the default one. > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > Visit this group at http://groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/91e947b3-b3d4-4cdc-b7d0-b3426eeea668%40googlegroups.com > <https://groups.google.com/d/msgid/django-users/91e947b3-b3d4-4cdc-b7d0-b3426eeea668%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAJxq849dDLq%3DitC7HujBqCT_8O-3VgmA_z7orpH-snZyguAxRg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.