1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Fixed #27555 -- Removed django.utils.functional.lazy_property.

This commit is contained in:
Adam Chainz
2016-11-30 00:01:12 +00:00
committed by Tim Graham
parent 05d2c5a66d
commit 71609a5b90
3 changed files with 3 additions and 41 deletions

View File

@@ -4,7 +4,7 @@ from __future__ import unicode_literals
import unittest
from django.utils import six
from django.utils.functional import cached_property, lazy, lazy_property
from django.utils.functional import cached_property, lazy
class FunctionalTestCase(unittest.TestCase):
@@ -38,25 +38,6 @@ class FunctionalTestCase(unittest.TestCase):
t = lazy(lambda: Klazz(), Base)()
self.assertEqual(t.method(), 'Klazz')
def test_lazy_property(self):
class A(object):
def _get_do(self):
raise NotImplementedError
def _set_do(self, value):
raise NotImplementedError
do = lazy_property(_get_do, _set_do)
class B(A):
def _get_do(self):
return "DO IT"
with self.assertRaises(NotImplementedError):
A().do
self.assertEqual(B().do, 'DO IT')
def test_lazy_object_to_string(self):
class Klazz(object):