          self.maxDiff=None
          # Here, we demonstrate that choices for a ForeignKey ChoiceField are determined
          # at runtime, based on the data in the database when the form is displayed, not
          # the data in the database when the form is instantiated.
          f = ArticleForm(auto_id=False)
          self.assertHTMLEqual(f.as_ul(), '''<li>Headline: <input type="text" name="headline" maxlength="50" /></li>
  <li>Slug: <input type="text" name="slug" maxlength="50" /></li>
  <li>Pub date: <input type="text" name="pub_date" /></li>
 
</s> remove         self.assertEqual(Category.objects.get(id=c3.id).name, 'Third')
 </s> add         self.assertEqual(Category.objects.get(id=cat.id).name, 'Third') </s> remove         # 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')
        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>''')

        art = Article(
            headline='Test article',
            slug='test-article',
            pub_date=datetime.date(1988, 1, 4),
            writer=w,
            article='Hello.'
        )
        art.save()
        art_id_1 = art.id
        self.assertEqual(art_id_1 is not None, True)
        f = TestArticleForm(auto_id=False, instance=art)
        self.assertHTMLEqual(f.as_ul(), '''<li>Headline: <input type="text" name="headline" value="Test article" maxlength="50" /></li>
<li>Slug: <input type="text" name="slug" value="test-article" maxlength="50" /></li>
 </s> add         # Add some categories and test the many-to-many form output.
        new_art = Article.objects.create(
            article="Hello.", headline="New headline", slug="new-headline",
            pub_date=datetime.date(1988, 1, 4), writer=self.w_royko)
        new_art.categories.add(Category.objects.get(name='Entertainment'))
        self.assertQuerysetEqual(new_art.categories.all(), ["Entertainment"])
        f = ArticleForm(auto_id=False, instance=new_art)
        self.assertHTMLEqual(f.as_ul(), '''<li>Headline: <input type="text" name="headline" value="New headline" maxlength="50" /></li>
<li>Slug: <input type="text" name="slug" value="new-headline" maxlength="50" /></li> </s> remove         self.assertEqual(w_bernstein.name, 'Carl Bernstein')
 </s> add  </s> remove         self.assertEqual(c4.name, 'Fourth')
 </s> add 
        self.create_basic_data()
          self.maxDiff=None
          # Here, we demonstrate that choices for a ForeignKey ChoiceField are determined
          # at runtime, based on the data in the database when the form is displayed, not
          # the data in the database when the form is instantiated.
        self.create_basic_data()
          f = ArticleForm(auto_id=False)
          self.assertHTMLEqual(f.as_ul(), '''<li>Headline: <input type="text" name="headline" maxlength="50" /></li>
  <li>Slug: <input type="text" name="slug" maxlength="50" /></li>
  <li>Pub date: <input type="text" name="pub_date" /></li>
keep keep keep add keep keep keep keep
 Fixed #6103 -- Splitted tests in model_forms tests 
tests/model_forms/tests.py