          with self.assertNumQueries(2):
              # One for Location, one for Guest, and no query for EventGuide
              n.collect(objs)
  
  class UtilTests(unittest.TestCase):
      def test_values_from_lookup_field(self):
          """
          Regression test for #12654: lookup_field
          """
          SITE_NAME = 'example.com'
 
</s> remove         self.assertEqual(helpers.AdminField(form, 'text', is_first=False).label_tag(),
                         '<label for="id_text" class="required inline">&amp;text:</label>')
        self.assertEqual(helpers.AdminField(form, 'cb', is_first=False).label_tag(),
                         '<label for="id_cb" class="vCheckboxLabel required inline">&amp;cb</label>')
 </s> add         self.assertHTMLEqual(helpers.AdminField(form, 'text', is_first=False).label_tag(),
                             '<label for="id_text" class="required inline">&amp;text:</label>')
        self.assertHTMLEqual(helpers.AdminField(form, 'cb', is_first=False).label_tag(),
                             '<label for="id_cb" class="vCheckboxLabel required inline">&amp;cb</label>') </s> remove         self.assertEqual(display_value, expected)
 </s> add         self.assertHTMLEqual(display_value, expected) </s> remove         self.assertEqual(helpers.AdminField(form, 'text', is_first=False).label_tag(),
                         '<label for="id_text" class="required inline"><i>text</i>:</label>')
        self.assertEqual(helpers.AdminField(form, 'cb', is_first=False).label_tag(),
                         '<label for="id_cb" class="vCheckboxLabel required inline"><i>cb</i></label>')
 </s> add         self.assertHTMLEqual(helpers.AdminField(form, 'text', is_first=False).label_tag(),
                             '<label for="id_text" class="required inline"><i>text</i>:</label>')
        self.assertHTMLEqual(helpers.AdminField(form, 'cb', is_first=False).label_tag(),
                             '<label for="id_cb" class="vCheckboxLabel required inline"><i>cb</i></label>') </s> remove from django.test import TestCase
from django.utils import unittest
 </s> add from django.test import SimpleTestCase, TestCase </s> remove             contents = format_html('<label for="{0}"{1}>{2}</label>',
                                   widget.id_for_label(id_), attrs, contents
                                   )
 </s> add             contents = format_html('<label{0}>{1}</label>', attrs, contents)
class UtilTests(SimpleTestCase):
          with self.assertNumQueries(2):
              # One for Location, one for Guest, and no query for EventGuide
              n.collect(objs)
  
class UtilTests(SimpleTestCase):
      def test_values_from_lookup_field(self):
          """
          Regression test for #12654: lookup_field
          """
          SITE_NAME = 'example.com'
keep keep keep keep replace keep keep keep keep keep
 Fixed #11725 -- Made possible to create widget label tag without "for"

Thanks Denis Martinez for the report and initial patch, and
Sergey Kolosov for bringing the patch up to date. 
tests/admin_util/tests.py