Corrected expected test output to allow for cleanups in signal and compatibility checks.
This commit is contained in:
parent
c41335fa27
commit
6b63742ce5
|
@ -31,9 +31,9 @@ def check_model_signals(app_configs=None, **kwargs):
|
||||||
# The receiver is either a function or an instance of class
|
# The receiver is either a function or an instance of class
|
||||||
# defining a `__call__` method.
|
# defining a `__call__` method.
|
||||||
if isinstance(receiver, types.FunctionType):
|
if isinstance(receiver, types.FunctionType):
|
||||||
description = "The `%s` function" % receiver.__name__
|
description = "The '%s' function" % receiver.__name__
|
||||||
else:
|
else:
|
||||||
description = "An instance of the `%s` class" % receiver.__class__.__name__
|
description = "An instance of the '%s' class" % receiver.__class__.__name__
|
||||||
errors.append(
|
errors.append(
|
||||||
Error(
|
Error(
|
||||||
"%s was connected to the '%s' signal "
|
"%s was connected to the '%s' signal "
|
||||||
|
|
|
@ -32,7 +32,7 @@ class ModelValidationTest(TestCase):
|
||||||
errors = run_checks()
|
errors = run_checks()
|
||||||
expected = [
|
expected = [
|
||||||
Error(
|
Error(
|
||||||
"The `on_post_init` function was connected to the `post_init` "
|
"The 'on_post_init' function was connected to the 'post_init' "
|
||||||
"signal with a lazy reference to the 'missing-app.Model' "
|
"signal with a lazy reference to the 'missing-app.Model' "
|
||||||
"sender, which has not been installed.",
|
"sender, which has not been installed.",
|
||||||
hint=None,
|
hint=None,
|
||||||
|
@ -40,8 +40,8 @@ class ModelValidationTest(TestCase):
|
||||||
id='signals.E001',
|
id='signals.E001',
|
||||||
),
|
),
|
||||||
Error(
|
Error(
|
||||||
"An instance of the `OnPostInit` class was connected to "
|
"An instance of the 'OnPostInit' class was connected to "
|
||||||
"the `post_init` signal with a lazy reference to the "
|
"the 'post_init' signal with a lazy reference to the "
|
||||||
"'missing-app.Model' sender, which has not been installed.",
|
"'missing-app.Model' sender, which has not been installed.",
|
||||||
hint=None,
|
hint=None,
|
||||||
obj='model_validation.tests',
|
obj='model_validation.tests',
|
||||||
|
|
Loading…
Reference in New Issue