From 9a82ca0a36798d0ca33353cd933cdbc8da0f677b Mon Sep 17 00:00:00 2001 From: James Bennett Date: Wed, 3 Mar 2010 08:01:48 +0000 Subject: Fixed #12879: Declaring the same JS file multiple times in a single Media instance now only includes that file once. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12663 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/regressiontests/forms/media.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests/regressiontests/forms') diff --git a/tests/regressiontests/forms/media.py b/tests/regressiontests/forms/media.py index fc1b412bcf..f47875db34 100644 --- a/tests/regressiontests/forms/media.py +++ b/tests/regressiontests/forms/media.py @@ -112,6 +112,18 @@ media_tests = r""" +# 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. +>>> class MyWidget4(TextInput): +... class Media: +... js = ('/path/to/js1', '/path/to/js1') + +>>> w4 = MyWidget4() +>>> print w4.media + + + ############################################################### # Property-based media definitions ############################################################### -- cgit v1.3