diff options
| author | James Bennett <ubernostrum@gmail.com> | 2010-03-03 08:19:23 +0000 |
|---|---|---|
| committer | James Bennett <ubernostrum@gmail.com> | 2010-03-03 08:19:23 +0000 |
| commit | faa341e61bd01fff44b3537545c3678a5f0bf48c (patch) | |
| tree | 68d6cf09eab98574e7245156796e9fd7e29ca97e /tests | |
| parent | 1d12aa2cfe5bf8e9fc36baefb1f9e1bedb9d5b93 (diff) | |
[1.1.X] Expanded the fix in [12663] to cover CSS declarations, which were also affected by the bug. Refs #12879. Backport of [12665] from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.1.X@12666 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/regressiontests/forms/media.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/regressiontests/forms/media.py b/tests/regressiontests/forms/media.py index f47875db34..d715fb4d80 100644 --- a/tests/regressiontests/forms/media.py +++ b/tests/regressiontests/forms/media.py @@ -112,15 +112,17 @@ media_tests = r""" <script type="text/javascript" src="http://media.other.com/path/to/js2"></script> <script type="text/javascript" src="https://secure.other.com/path/to/js3"></script> -# Regression check for #12879: specifying the same JS file multiple -# times in a single Media instance should result in that file only -# being included once. +# Regression check for #12879: specifying the same CSS or JS file +# multiple times in a single Media instance should result in that file +# only being included once. >>> class MyWidget4(TextInput): ... class Media: +... css = {'all': ('/path/to/css1', '/path/to/css1')} ... js = ('/path/to/js1', '/path/to/js1') >>> w4 = MyWidget4() >>> print w4.media +<link href="/path/to/css1" type="text/css" media="all" rel="stylesheet" /> <script type="text/javascript" src="/path/to/js1"></script> |
