mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Moved test_token_smart_split into ParserTests.
This commit is contained in:
committed by
Aymeric Augustin
parent
3d8fee6051
commit
25a0b5cdcd
@@ -7,13 +7,22 @@ from unittest import TestCase
|
||||
|
||||
from django.template import Library, Template, TemplateSyntaxError
|
||||
from django.template.base import (
|
||||
FilterExpression, Parser, TokenParser, Variable,
|
||||
TOKEN_BLOCK, FilterExpression, Parser, Token, TokenParser, Variable,
|
||||
)
|
||||
from django.test import override_settings
|
||||
from django.utils import six
|
||||
|
||||
|
||||
class ParserTests(TestCase):
|
||||
|
||||
def test_token_smart_split(self):
|
||||
"""
|
||||
#7027 -- _() syntax should work with spaces
|
||||
"""
|
||||
token = Token(TOKEN_BLOCK, 'sometag _("Page not found") value|yesno:_("yes,no")')
|
||||
split = token.split_contents()
|
||||
self.assertEqual(split, ["sometag", '_("Page not found")', 'value|yesno:_("yes,no")'])
|
||||
|
||||
def test_token_parsing(self):
|
||||
# Tests for TokenParser behavior in the face of quoted strings with
|
||||
# spaces.
|
||||
|
||||
Reference in New Issue
Block a user