  @override_settings(ROOT_URLCONF='test_utils.urls')
  class CaptureQueriesContextManagerTests(TestCase):
  
      def setUp(self):
          self.person_pk = six.text_type(Person.objects.create(name='test').pk)
  
      def test_simple(self):
          with CaptureQueriesContext(connection) as captured_queries:
              Person.objects.get(pk=self.person_pk)
          self.assertEqual(len(captured_queries), 1)
 
</s> remove         self.assertIsInstance(instance.value, six.integer_types)
 </s> add         self.assertIsInstance(instance.value, int) </s> remove         return six.text_type(self.num)
 </s> add         return str(self.num) </s> remove             addresses = [[six.text_type(address) for address in obj.addresses.all()]
 </s> add             addresses = [[str(address) for address in obj.addresses.all()] </s> remove         self.assertEqual(addresses, [[six.text_type(self.author_address)], [], []])
 </s> add         self.assertEqual(addresses, [[str(self.author_address)], [], []]) </s> remove                 if isinstance(content, six.binary_type):
 </s> add                 if isinstance(content, bytes):
        self.person_pk = str(Person.objects.create(name='test').pk)
  @override_settings(ROOT_URLCONF='test_utils.urls')
  class CaptureQueriesContextManagerTests(TestCase):
  
      def setUp(self):
        self.person_pk = str(Person.objects.create(name='test').pk)
  
      def test_simple(self):
          with CaptureQueriesContext(connection) as captured_queries:
              Person.objects.get(pk=self.person_pk)
          self.assertEqual(len(captured_queries), 1)
keep keep keep keep replace keep keep keep keep keep
 Refs #23919 -- Removed six.<various>_types usage

Thanks Tim Graham and Simon Charette for the reviews. 
tests/test_utils/tests.py