summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/expressions/tests.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/expressions/tests.py b/tests/expressions/tests.py
index 2bc40956a7..36cb95a5f7 100644
--- a/tests/expressions/tests.py
+++ b/tests/expressions/tests.py
@@ -1,5 +1,6 @@
from __future__ import unicode_literals
+from copy import deepcopy
import datetime
from django.core.exceptions import FieldError
@@ -287,6 +288,14 @@ class ExpressionsTests(TestCase):
)
self.assertEqual(str(qs.query).count('JOIN'), 2)
+ def test_F_object_deepcopy(self):
+ """
+ Make sure F objects can be deepcopied (#23492)
+ """
+ f = F("foo")
+ g = deepcopy(f)
+ self.assertEqual(f.name, g.name)
+
class ExpressionsNumericTests(TestCase):