summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/field_deconstruction/tests.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/field_deconstruction/tests.py b/tests/field_deconstruction/tests.py
index 49bc57f8f1..cb78003318 100644
--- a/tests/field_deconstruction/tests.py
+++ b/tests/field_deconstruction/tests.py
@@ -96,6 +96,12 @@ class FieldDeconstructionTests(TestCase):
self.assertEqual(path, "django.db.models.DateTimeField")
self.assertEqual(args, [])
self.assertEqual(kwargs, {"auto_now_add": True})
+ # Bug #21785
+ field = models.DateTimeField(auto_now=True, auto_now_add=True)
+ name, path, args, kwargs = field.deconstruct()
+ self.assertEqual(path, "django.db.models.DateTimeField")
+ self.assertEqual(args, [])
+ self.assertEqual(kwargs, {"auto_now_add": True, "auto_now": True})
def test_decimal_field(self):
field = models.DecimalField(max_digits=5, decimal_places=2)