              # explicit manager should raise an attribute error with a
              # helpful message
              try:
                  SwappableModel.objects.all()
                  self.fail('Should raise an AttributeError')
              except AttributeError as e:
                  self.assertEqual(str(e), "Manager isn't available; SwappableModel has been swapped for 'managers_regress.Parent'")
  
          finally:
              apps.app_configs['managers_regress'].models = _old_models
              apps.all_models['managers_regress'] = _old_models
              apps.clear_cache()
  
 
</s> remove                 self.fail('Should raise an AttributeError')
            except AttributeError as e:
                self.assertEqual(str(e), "Manager isn't available; SwappableModel has been swapped for 'managers_regress.Parent'")

 </s> add  </s> remove                 self.fail('Should raise an AttributeError')
            except AttributeError as e:
                self.assertEqual(str(e), "Manager isn't available; SwappableModel has been swapped for 'managers_regress.Parent'")

 </s> add  </s> remove         raise AttributeError("Manager isn't available; %s has been swapped for '%s'" % (
            self.model._meta.object_name, self.model._meta.swapped
        ))
 </s> add         raise AttributeError(
            "Manager isn't available; '%s.%s' has been swapped for '%s'" % (
                self.model._meta.app_label,
                self.model._meta.object_name,
                self.model._meta.swapped,
            )
        ) </s> remove             try:
 </s> add             msg = (
                "Manager isn't available; 'managers_regress.SwappableModel' "
                "has been swapped for 'managers_regress.Parent'"
            )
            with self.assertRaisesMessage(AttributeError, msg): </s> remove             try:
 </s> add             msg = (
                "Manager isn't available; 'managers_regress.SwappableModel' "
                "has been swapped for 'managers_regress.Parent'"
            )
            with self.assertRaisesMessage(AttributeError, msg):
              # explicit manager should raise an attribute error with a
              # helpful message
              try:
                  SwappableModel.objects.all()




          finally:
              apps.app_configs['managers_regress'].models = _old_models
              apps.all_models['managers_regress'] = _old_models
              apps.clear_cache()
  
keep keep keep keep replace replace replace replace keep keep keep keep keep
 Fixed #25054 -- Added app_label to swapped model AttributeError 
tests/managers_regress/tests.py