From 853dd233a2f2968d3316377f1fd5cb5b9b8edaea Mon Sep 17 00:00:00 2001 From: Carlton Gibson Date: Fri, 15 Sep 2017 14:27:21 +0200 Subject: [PATCH] Correct deprecation warning message --- rest_framework/schemas/generators.py | 2 +- tests/test_schemas.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rest_framework/schemas/generators.py b/rest_framework/schemas/generators.py index 736d9d419..3e927527c 100644 --- a/rest_framework/schemas/generators.py +++ b/rest_framework/schemas/generators.py @@ -150,7 +150,7 @@ class EndpointEnumerator(object): return False # Ignore anything except REST framework views. if hasattr(callback.cls, 'exclude_from_schema'): - fmt = ("The `{}.exclude_from_schema` is pending deprecation. " + fmt = ("The `{}.exclude_from_schema` attribute is pending deprecation. " "Set `schema = None` instead.") msg = fmt.format(callback.cls.__name__) warnings.warn(msg, PendingDeprecationWarning) diff --git a/tests/test_schemas.py b/tests/test_schemas.py index 786db593b..184401a86 100644 --- a/tests/test_schemas.py +++ b/tests/test_schemas.py @@ -717,6 +717,6 @@ class SchemaGenerationExclusionTests(TestCase): assert len(record) == 1 assert str(record[0].message) == ( - "The `OldFashionedExcludedView.exclude_from_schema` is " + "The `OldFashionedExcludedView.exclude_from_schema` attribute is " "pending deprecation. Set `schema = None` instead." )