summaryrefslogtreecommitdiff
path: root/tests/utils_tests/test_simplelazyobject.py
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2017-01-21 20:02:00 -0500
committerGitHub <noreply@github.com>2017-01-21 20:02:00 -0500
commitd170c63351944fd91b2206d10f89e7ff75b53b76 (patch)
treee2be66471ab071fa0ce75097d66650b650c53853 /tests/utils_tests/test_simplelazyobject.py
parentc22212220a7900173358a1f16179dcfc9e03de78 (diff)
Refs #23919 -- Removed misc references to Python 2.
Diffstat (limited to 'tests/utils_tests/test_simplelazyobject.py')
-rw-r--r--tests/utils_tests/test_simplelazyobject.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/tests/utils_tests/test_simplelazyobject.py b/tests/utils_tests/test_simplelazyobject.py
index a83c78bf4c..d6386fe79c 100644
--- a/tests/utils_tests/test_simplelazyobject.py
+++ b/tests/utils_tests/test_simplelazyobject.py
@@ -7,15 +7,10 @@ from django.utils.functional import SimpleLazyObject
class TestUtilsSimpleLazyObjectDjangoTestCase(TestCase):
- def test_pickle_py2_regression(self):
- # See ticket #20212
+ def test_pickle(self):
user = User.objects.create_user('johndoe', 'john@example.com', 'pass')
x = SimpleLazyObject(lambda: user)
-
- # This would fail with "TypeError: can't pickle instancemethod objects",
- # only on Python 2.X.
pickle.dumps(x)
-
# Try the variant protocol levels.
pickle.dumps(x, 0)
pickle.dumps(x, 1)