From f7845449b44b5547115c0201795a6b8c1b594b0e Mon Sep 17 00:00:00 2001 From: Markus Amalthea Magnuson Date: Fri, 16 May 2014 18:59:44 +0200 Subject: [PATCH] Moved wordwrap test to their own function The `wordwrap` tests were in the `test_wordcount()` method for some reason. This moves them to their own method, and make consistent use of double quotes where needed. --- tests/defaultfilters/tests.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/defaultfilters/tests.py b/tests/defaultfilters/tests.py index 9a794bd9e7d..75fa9dcb4d4 100644 --- a/tests/defaultfilters/tests.py +++ b/tests/defaultfilters/tests.py @@ -370,16 +370,15 @@ class DefaultFiltersTests(TestCase): self.assertEqual(wordcount('oneword'), 1) self.assertEqual(wordcount('lots of words'), 3) + def test_wordwrap(self): self.assertEqual(wordwrap('this is a long paragraph of text that ' - 'really needs to be wrapped I\'m afraid', 14), - "this is a long\nparagraph of\ntext that\nreally needs\nto be " + "really needs to be wrapped I'm afraid", 14), + 'this is a long\nparagraph of\ntext that\nreally needs\nto be ' "wrapped\nI'm afraid") - self.assertEqual(wordwrap('this is a short paragraph of text.\n ' 'But this line should be indented', 14), 'this is a\nshort\nparagraph of\ntext.\n But this\nline ' 'should be\nindented') - self.assertEqual(wordwrap('this is a short paragraph of text.\n ' 'But this line should be indented', 15), 'this is a short\n' 'paragraph of\ntext.\n But this line\nshould be\nindented')