#16028: Consolidate default template filters' tests
--------------------------------------+------------------------------------
Reporter: julien | Owner: tobych
Type: Cleanup/optimization | Status: assigned
Component: Testing framework | Version: 1.3
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Comment (by tobych):
https://github.com/tobych/django/commits/ticket-16028-refactor-template-
filter-tests
@birdsarah and I have paired at the PyCon 2013 Sprint, with help from
@julien, @aaugustin and @honza, and made a few commits to the branch
above. See the individual commit messages for details. To summarize, we
applied @julien's original patch, rebased against master after fixing some
Unicode stuff, tidied a few things and added some comments to clarify the
intent we assumed when tidying up. Hopefully I'll finish this up tomorrow.
What's left with respect to the tests moved so far:
1. filters.py has some strings in double quotes; some single. I'll change
them to single quotes where appropriate. Or whatever the convention is.
2. The old tests tested that filters returned integers as appropriate. The
new tests just test against strings, so we've lost some coverage here.
I'll do what I can do fix that. In discussion with @birdsarah, @julien
suggests counting the tests that would need this and if there aren't too
many, just add new test cases for the non-string cases. Otherwise, he
suggests, consider changing test_templates() to allow non-strings to be
the expected result.
Then move the remaining filter tests in defaultfilters.tests to
filters.py.
--
Ticket URL: <https://code.djangoproject.com/ticket/16028#comment:15>
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].
For more options, visit https://groups.google.com/groups/opt_out.