Closed Bug 1129025 Opened 10 years ago Closed 9 years ago

delete the user fixtures from tests

Categories

(Marketplace Graveyard :: Code Quality, defect, P4)

Avenir
defect

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: eviljeff, Unassigned)

Details

(Whiteboard: [marketplace-transition])

We've got user_factory to make fresh new users for our tests but a lot of tests still use dusty old user_*.json fixtures instead. Lets fix that.
I don't think all fixtures are bad. Especially since we can group tests that have the same fixtures and also since tests can rollback the database to the just-loaded fixture state, both of which make tests faster. If we remove all fixtures I imagine we'll slow down the test suite.
(In reply to Rob Hudson [:robhudson] from comment #1) > I don't think all fixtures are bad. Especially since we can group tests that > have the same fixtures and also since tests can rollback the database to the > just-loaded fixture state, both of which make tests faster. If we remove all > fixtures I imagine we'll slow down the test suite. Are there any stats on the speed difference? If it is indeed a problem then the majority of existing uses of app_factory and user_factory (284+38) should probably either be replaced with fixtures, or some optimization done there. An example - user_999 is loaded 93 times, and its just an entirely ordinary user. Can be replaced with user_factory(username='regular') - 'regular' to keep compatibility with existing tests.
Priority: -- → P4
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
Whiteboard: [marketplace-transition]
You need to log in before you can comment on or make changes to this bug.