Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed autopk issue in tests

  • Loading branch information...
commit ba4331f1775ef4dd2895b3592092973e24db3c25 1 parent 2d0b35d
@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
@@ -1528,7 +1528,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.