summaryrefslogtreecommitdiffstats
path: root/patchwork/tests/test_patchparser.py
Commit message (Collapse)AuthorAgeFilesLines
* patchwork: Explicitly load states fixturesJeremy Kerr2015-06-051-1/+5
| | | | | | | | | | | Apps with migrations will no longer load the initial_data fixtures by default. In order to prepare to add migrations to patchwork, rename the initial_data fixture to default_states (to match the default_tags fixture), and explicitly load them in tests that require them. Also, include this step in the INSTALL document. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* tests: Remove old-style test runner moduleJeremy Kerr2015-05-281-1/+39
| | | | | | | | | | | | | | | We get the following warning on django 1.7: System check identified some issues: WARNINGS: ?: (1_6.W001) Some project unittests may not execute as expected. HINT: Django 1.6 introduced a new default test runner. It looks like this project was generated using Django 1.5 or earlier. You should ensure your tests are all running & behaving as expected. See https://docs.djangoproject.com/en/dev/releases/1.6/#new-test-runner for more information. This change removes the unneeded base test module, and moves the patchparser doctests into a proper test module. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Add patch tag infrastructureJeremy Kerr2015-05-281-0/+27
| | | | | | | | | | | | | | | | | | | | | This change add patch 'tags', eg 'Acked-by' / 'Reviewed-by', etc., to patchwork. Tag parsing is implemented in the patch parser's extract_tags function, which returns a Counter object of the tags in a comment. These are stored in the PatchTag (keyed to Tag) objects associated with each patch. We need to ensure that the main patch lists do not cause per-patch queries on the Patch.tags ManyToManyField (this would result in ~500 queries per page), so we introduce a new QuerySet (and Manager) for Patch, adding a with_tag_counts() method to populate the tag counts in a single query. As users may be migrating from previous patchwork versions (ie, with no tag counts in the database), we add a 'retag' management command. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Move to a more recent django project structureJeremy Kerr2015-05-271-0/+554
This change updates patchwor to the newer project struture: we've moved the actual application out of the apps/ directory, and the patchwork-specific templates to under the patchwork application. This gives us the manage.py script in the top-level now. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>