@@ -591,7 +595,7 @@ class ModelToDictTests(TestCase):
]
forcincategories:
c.save()
writer=Writer(name='Test writer')
writer=Author(name='Test writer')
writer.save()
art=Article(
...
...
@@ -700,10 +704,10 @@ class OldFormForXTests(TestCase):
withself.assertRaises(ValueError):
f.save()
# Create a couple of Writers.
w_royko=Writer(name='Mike Royko')
# Create a couple of Authors.
w_royko=Author(name='Mike Royko')
w_royko.save()
w_woodward=Writer(name='Bob Woodward')
w_woodward=Author(name='Bob Woodward')
w_woodward.save()
# ManyToManyFields are represented by a MultipleChoiceField, ForeignKeys and any
# fields with the 'choices' attribute are represented by a ChoiceField.
...
...
@@ -741,9 +745,9 @@ class OldFormForXTests(TestCase):
# When the ModelForm is passed an instance, that instance's current values are
# inserted as 'initial' data in each Field.
w=Writer.objects.get(name='Mike Royko')
w=Author.objects.get(name='Mike Royko')
f=RoykoForm(auto_id=False,instance=w)
self.assertHTMLEqual(six.text_type(f),'''<tr><th>Name:</th><td><input type="text" name="name" value="Mike Royko" maxlength="50" /><br /><span class="helptext">Use both first and last names.</span></td></tr>''')
self.assertHTMLEqual(six.text_type(f),'''<tr><th>Name:</th><td><input type="text" name="name" value="Mike Royko" maxlength="100" /><br /><span class="helptext">Use both first and last names.</span></td></tr>''')
art=Article(
headline='Test article',
...
...
@@ -955,7 +959,7 @@ class OldFormForXTests(TestCase):