Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[1.5.x] Fixed autopk issue in tests

Backpatch of ba4331f
  • Loading branch information...
commit 2d74a5fd65d94ea4cfb91dec56bf5d18c07e32c6 1 parent 0c96aae
@akaariai akaariai authored
Showing with 6 additions and 3 deletions.
  1. +6 −3 tests/modeltests/model_forms/tests.py
View
9 tests/modeltests/model_forms/tests.py
@@ -1525,7 +1525,10 @@ def test_iterable_model_m2m(self) :
colour = Colour.objects.create(name='Blue')
form = ColourfulItemForm()
self.maxDiff = 1024
- self.assertHTMLEqual(form.as_p(), """<p><label for="id_name">Name:</label> <input id="id_name" type="text" name="name" maxlength="50" /></p>
+ self.assertHTMLEqual(
+ form.as_p(),
+ """<p><label for="id_name">Name:</label> <input id="id_name" type="text" name="name" maxlength="50" /></p>
<p><label for="id_colours">Colours:</label> <select multiple="multiple" name="colours" id="id_colours">
- <option value="1">Blue</option>
- </select> <span class="helptext"> Hold down "Control", or "Command" on a Mac, to select more than one.</span></p>""")
+ <option value="%(blue_pk)s">Blue</option>
+ </select> <span class="helptext"> Hold down "Control", or "Command" on a Mac, to select more than one.</span></p>"""
+ % {'blue_pk': colour.pk})
Please sign in to comment.
Something went wrong with that request. Please try again.