Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#23929 closed New feature (fixed)

More tests for create_default_site

Reported by: Wojtek Ruszczewski Owned by: nobody
Component: contrib.sites Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

There are some aspects of the sites.management.create_default_site handler that lack proper testing.

Tickets introducing or related to various pieces of it are: #7514, #15346, #15573, #16353, #16828, #17415 (the last one includes a test).

Change History (5)

comment:1 by Wojtek Ruszczewski, 10 years ago

Has patch: set
Patch needs improvement: set

The patch by ticket (some guessing about the problems):

  • #7514 introduced 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 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 were 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.

Last edited 10 years ago by Wojtek Ruszczewski (previous) (diff)

comment:2 by Tim Graham, 10 years ago

Triage Stage: UnreviewedAccepted

comment:3 by Tim Graham, 10 years ago

Patch needs improvement: unset
Triage Stage: AcceptedReady for checkin

comment:4 by Tim Graham <timograham@…>, 10 years ago

Resolution: fixed
Status: newclosed

In 1f98ec2e53e4636863396ab54f671f4546f9ba4c:

Fixed #23929 -- Added more tests for create_default_site.

Refs: #15346, #15573, #16353, #16828.

comment:5 by Tim Graham <timograham@…>, 10 years ago

In 965a999ae5a03ca595f3842feacfbce5dc12f20a:

[1.7.x] Fixed #23929 -- Added more tests for create_default_site.

Backport of 1f98ec2e53e4636863396ab54f671f4546f9ba4c from master

Note: See TracTickets for help on using tickets.
Back to Top