Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Modified wrong expected ClearableFileInput rendering output in a coup…

…le of additional tests after fix introduced in [15426]. Refs #14984.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15432 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit accee3961ce742884672eba24cbf04138ef2bb1d 1 parent 0b8b60c
Ramiro Morales authored February 05, 2011
2  tests/regressiontests/admin_widgets/tests.py
@@ -232,7 +232,7 @@ def test_render(self):
232 232
         w = AdminFileWidget()
233 233
         self.assertEqual(
234 234
             conditional_escape(w.render('test', album.cover_art)),
235  
-            '<p class="file-upload">Currently: <a target="_blank" href="%(STORAGE_URL)salbums/hybrid_theory.jpg">albums\hybrid_theory.jpg</a> <span class="clearable-file-input"><input type="checkbox" name="test-clear" id="test-clear_id" /> <label for="test-clear_id">Clear</label></span><br />Change: <input type="file" name="test" /></p>' % { 'STORAGE_URL': default_storage.url('') },
  235
+            '<p class="file-upload">Currently: <a href="%(STORAGE_URL)salbums/hybrid_theory.jpg">albums\hybrid_theory.jpg</a> <span class="clearable-file-input"><input type="checkbox" name="test-clear" id="test-clear_id" /> <label for="test-clear_id">Clear</label></span><br />Change: <input type="file" name="test" /></p>' % { 'STORAGE_URL': default_storage.url('') },
236 236
         )
237 237
 
238 238
         self.assertEqual(
4  tests/regressiontests/forms/tests/widgets.py
@@ -1084,7 +1084,7 @@ def test_clear_input_renders(self):
1084 1084
         widget = ClearableFileInput()
1085 1085
         widget.is_required = False
1086 1086
         self.assertEqual(widget.render('myfile', FakeFieldFile()),
1087  
-                         u'Currently: <a target="_blank" href="something">something</a> <input type="checkbox" name="myfile-clear" id="myfile-clear_id" /> <label for="myfile-clear_id">Clear</label><br />Change: <input type="file" name="myfile" />')
  1087
+                         u'Currently: <a href="something">something</a> <input type="checkbox" name="myfile-clear" id="myfile-clear_id" /> <label for="myfile-clear_id">Clear</label><br />Change: <input type="file" name="myfile" />')
1088 1088
 
1089 1089
     def test_clear_input_renders_only_if_not_required(self):
1090 1090
         """
@@ -1095,7 +1095,7 @@ def test_clear_input_renders_only_if_not_required(self):
1095 1095
         widget = ClearableFileInput()
1096 1096
         widget.is_required = True
1097 1097
         self.assertEqual(widget.render('myfile', FakeFieldFile()),
1098  
-                         u'Currently: <a target="_blank" href="something">something</a> <br />Change: <input type="file" name="myfile" />')
  1098
+                         u'Currently: <a href="something">something</a> <br />Change: <input type="file" name="myfile" />')
1099 1099
 
1100 1100
     def test_clear_input_renders_only_if_initial(self):
1101 1101
         """

0 notes on commit accee39

Please sign in to comment.
Something went wrong with that request. Please try again.