Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#23099 closed Cleanup/optimization (fixed)

Remove usage of deprecated initial data in Django's test suite

Reported by: Tim Graham Owned by: Tim Graham
Component: GIS Version: dev
Severity: Release blocker 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

Initial data was marked as deprecated in 1.7 (f44dbf74a4abf9c45d49568c7ca46363ff6e5112), but there is still usage of it in Django's test suite. I'm guessing the first two usages test the actual feature and can stay until the feature is removed (the deprecation warning needs to be silenced), but I think the gis tests need to be updated to not use it.

$ find . -name 'initial_data.*'
./tests/fixtures/fixtures/initial_data.json
./tests/fixtures_model_package/fixtures/initial_data.json
./django/contrib/gis/tests/relatedapp/fixtures/initial_data.json.gz
./django/contrib/gis/tests/distapp/fixtures/initial_data.json.gz
./django/contrib/gis/tests/geogapp/fixtures/initial_data.json
./django/contrib/gis/tests/geoapp/fixtures/initial_data.json.gz

Change History (12)

comment:1 by Andrew Godwin, 10 years ago

Well, it's deprecated along with all apps requiring migrations, so this ticket should really be "add migrations to every single test app". I'd vote that we postpone this until the 1.8 release (all contrib apps are now on migrations at least, so the main framework is fine)

comment:2 by Tim Graham, 10 years ago

Can I just rename the initial_data.* files to initial.* and use TestCase.fixtures?

I'd think adding migrations for test apps would be part of #22340 (although I hope we can find a away to avoid it or have it done automatically).

comment:3 by James Bennett, 10 years ago

Version: 1.7-rc-1master

While this is a release blocker, it is not a release blocker for 1.7; it will be a blocker for 1.8.

comment:4 by Andrew Godwin, 10 years ago

+1 on moving the initial data to normal test fixtures.

comment:5 by Tim Graham, 10 years ago

Owner: changed from nobody to Tim Graham
Status: newassigned

comment:6 by Tim Graham, 10 years ago

Has patch: set

comment:7 by Tim Graham, 10 years ago

Patch needs improvement: set

This has introduced some non-deterministic failures that I haven't been able to resolve yet.

comment:8 by Claude Paroz, 10 years ago

Patch needs improvement: unset
Triage Stage: AcceptedReady for checkin

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

Resolution: fixed
Status: assignedclosed

In f53b1c779b9a6258cfb61ef00ed5ec8340b96d52:

Fixed #23099 -- Removed usage of deprecated initial data in Django's test suite.

Thanks Claude Paroz for assistance with debugging the tests.

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

In 09c0fa2c5365817f5ec21a048612d7a926b7d3a6:

Fixed a non-deterministic test; refs #23099.

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

In 135a58f9dc9dd121b8e3577538456fb15f63b897:

Fixed a non-deterministic test; refs #23099.

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

In 9a5fe5b29fd431431a53da63ad8825d878ee5878:

Added ordering to prevent non-deterministic test failure; refs #23099.

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