#21164: get_user_model() does not handle custom user models for testing purposes -----------------------------------+-------------------------------------- Reporter: raymond.penners@… | Owner: nobody Type: Bug | Status: closed Component: contrib.auth | Version: 1.5 Severity: Normal | Resolution: invalid Keywords: | Triage Stage: Unreviewed Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -----------------------------------+--------------------------------------
Comment (by raymond.penners@…): Then the documentation over at https://docs.djangoproject.com/en/dev/topics/auth/customizing/#custom- users-and-testing-fixtures is very misleading. The examples suggest that this is the way to test with a customer user model: {{{ class ApplicationTestCase(TestCase): ... @override_settings(AUTH_USER_MODEL='auth.CustomUser') def test_custom_user(self): "Run tests for a custom user model with email-based authentication" self.assertSomething() }}} However, attempting to do so fails (as shown by my example). -- Ticket URL: <https://code.djangoproject.com/ticket/21164#comment:5> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/084.046efdff81dd0cae303d45ea046f8717%40djangoproject.com. For more options, visit https://groups.google.com/groups/opt_out.