mirror of
https://github.com/django/django.git
synced 2025-08-03 10:34:04 +00:00
Added support for serializing class methods. - Refs #21290.
The new handling allows us to do away with the whitelisting that was required to support date and datetime objects.
This commit is contained in:
parent
584110417f
commit
8d6953d55c
2 changed files with 5 additions and 12 deletions
|
@ -73,6 +73,8 @@ class WriterTests(TestCase):
|
|||
# Datetime stuff
|
||||
self.assertSerializedEqual(datetime.datetime.utcnow())
|
||||
self.assertSerializedEqual(datetime.datetime.utcnow)
|
||||
self.assertSerializedEqual(datetime.datetime.today())
|
||||
self.assertSerializedEqual(datetime.datetime.today)
|
||||
self.assertSerializedEqual(datetime.date.today())
|
||||
self.assertSerializedEqual(datetime.date.today)
|
||||
# Django fields
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue