                  asos.save(force_update=True)
              with self.assertRaises(DatabaseError):
                  asos.save(update_fields=['pub_date'])
          finally:
              Article._base_manager.__class__ = orig_class
  
  
  class ModelRefreshTests(TestCase):
      def _truncate_ms(self, val):
          # MySQL < 5.6.4 removes microseconds from the datetimes which can cause
 
</s> remove         orig_class = Article._base_manager.__class__
 </s> add         orig_class = Article._base_manager._queryset_class </s> remove             Article._base_manager.__class__ = FakeManager
 </s> add             Article._base_manager._queryset_class = FakeQuerySet </s> remove         class FakeManager(orig_class):
            def get_queryset(self):
                return FakeQuerySet(self.model)
 </s> add 
            Article._base_manager._queryset_class = orig_class
                  asos.save(force_update=True)
              with self.assertRaises(DatabaseError):
                  asos.save(update_fields=['pub_date'])
          finally:
            Article._base_manager._queryset_class = orig_class
  
  
  class ModelRefreshTests(TestCase):
      def _truncate_ms(self, val):
          # MySQL < 5.6.4 removes microseconds from the datetimes which can cause
keep keep keep keep replace keep keep keep keep keep
 Fixed #10506, #13793, #14891, #25201 -- Introduced new APIs to specify models' default and base managers.

This deprecates use_for_related_fields.

Old API:

class CustomManager(models.Model):
    use_for_related_fields = True

class Model(models.Model):
    custom_manager = CustomManager()

New API:

class Model(models.Model):
    custom_manager = CustomManager()

    class Meta:
        base_manager_name = 'custom_manager'

Refs #20932, #25897.

Thanks Carl Meyer for the guidance throughout this work.
Thanks Tim Graham for writing the docs. 
tests/basic/tests.py