                  id='fields.E307',
              ),
          ]
          self.assertEqual(errors, expected)
 
</s> remove             self.receiver, sender='signals.Created', weak=False
 </s> add             self.receiver, sender='signals.Created', weak=False, apps=apps </s> remove     @isolate_apps('signals')
    def test_not_loaded_model(self):
 </s> add     @isolate_apps('signals', kwarg_name='apps')
    def test_not_loaded_model(self, apps): </s> remove         msg = "Specified sender must either be a model or a model name of the 'app_label.ModelName' form."
 </s> add         msg = "Invalid model reference 'invalid'. String model references must be of the form 'app_label.ModelName'." </s> remove         errors = _check_lazy_references(apps)
 </s> add         post_init.connect(dummy_function, sender='missing-app.Model', apps=apps)
        post_init.connect(DummyClass(), sender='missing-app.Model', apps=apps)
        post_init.connect(DummyClass().dummy_method, sender='missing-app.Model', apps=apps)
            Error(
                "The function 'dummy_function' was connected to the 'post_init' "
                "signal with a lazy reference to the sender "
                "'missing-app.model', but app 'missing-app' isn't installed.",
                hint=None,
                obj='model_validation.tests',
                id='signals.E001',
            ),
                  id='fields.E307',
              ),
            Error(
                "The function 'dummy_function' was connected to the 'post_init' "
                "signal with a lazy reference to the sender "
                "'missing-app.model', but app 'missing-app' isn't installed.",
                hint=None,
                obj='model_validation.tests',
                id='signals.E001',
            ),
          ]
          self.assertEqual(errors, expected)
keep add keep keep
 Fixed #26421 -- Refactored ModelSignal to use Apps.lazy_model_operation() 
tests/model_validation/tests.py