summaryrefslogtreecommitdiff
path: root/tests/utils_tests
diff options
context:
space:
mode:
authorJohn-Scott Atlakson <john.scott.atlakson@gmail.com>2014-10-19 18:34:35 -0400
committerTim Graham <timograham@gmail.com>2014-10-20 17:59:07 -0400
commitdbf7a3df45e733c1e51d98318fd87de5ffc160a8 (patch)
treef9cbd122f63a7ee221ff3763a8ef64735c3d46c6 /tests/utils_tests
parent54e695331b07a572e0f37085725d23df69980628 (diff)
downloaddjango-dbf7a3df45e733c1e51d98318fd87de5ffc160a8.tar.gz
Fixed #23688 -- Updated cached_property to preserve docstring of original function
Diffstat (limited to 'tests/utils_tests')
-rw-r--r--tests/utils_tests/test_functional.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/utils_tests/test_functional.py b/tests/utils_tests/test_functional.py
index e9010b3135..b806be0b16 100644
--- a/tests/utils_tests/test_functional.py
+++ b/tests/utils_tests/test_functional.py
@@ -50,6 +50,7 @@ class FunctionalTestCase(unittest.TestCase):
@cached_property
def value(self):
+ """Here is the docstring..."""
return 1, object()
def other_value(self):
@@ -57,6 +58,9 @@ class FunctionalTestCase(unittest.TestCase):
other = cached_property(other_value, name='other')
+ # docstring should be preserved
+ self.assertEqual(A.value.__doc__, "Here is the docstring...")
+
a = A()
# check that it is cached