#23929: More tests for create_default_site
-------------------------------+--------------------------------------
     Reporter:  wrwrwr         |                    Owner:  nobody
         Type:  New feature    |                   Status:  new
    Component:  contrib.sites  |                  Version:  master
     Severity:  Normal         |               Resolution:
     Keywords:                 |             Triage Stage:  Unreviewed
    Has patch:  1              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  1
Easy pickings:  0              |                    UI/UX:  0
-------------------------------+--------------------------------------
Changes (by wrwrwr):

 * needs_better_patch:   => 1
 * has_patch:  0 => 1
 * needs_tests:   => 0
 * needs_docs:   => 0


Comment:

 The patch by ticket (some guessing about the problems):
 * #7514 introduces a `clear_cache` statement, that's probably not needed
 any longer, because a `pre_save` signal clearing the cache was added in
 the meantime (the test the ticket refers to can be found
 [https://github.com/django/django/blob/attic/newforms-
 admin/django/contrib/auth/tests/forms.py here]; removing the statement
 doesn't seem to cause any failures now);
 * I believe the main issue in #15346 and #15573 was preventing the
 creation of more than one site;
 * #16353 and #16828 are about a multi-database setup, just an
 `allow_migrate` condition is what is needed currently;
 * #17415 has a nice test, but moving it to the new testcase makes it even
 better (by avoiding the `SitesFrameworkTests.setUp`), the test still fails
 with PostgreSQL if you remove the sequence resetting part in
 `create_default_site`.

 Some cleanup of the patch is needed -- I suspect that removing the
 `clear_cache` statement and replacing 1 with SITE_ID should go as separate
 tickets.

--
Ticket URL: <https://code.djangoproject.com/ticket/23929#comment:1>
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/064.a2e3814d41e6b7ff9f1719e64bf9c623%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to