summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBaptiste Mispelon <bmispelon@gmail.com>2015-04-02 16:49:41 +0200
committerBaptiste Mispelon <bmispelon@gmail.com>2015-04-02 17:21:20 +0200
commit30a3c2f74c030449d3a8b9f02ab6744874712e54 (patch)
tree5dc7c4f20143caccb65dd51095e53a44f0894900 /tests
parent0f941f57ba29088e56fcd6639b0b68781d11f837 (diff)
Fixed #24566 -- Added support for serializing timedelta
Thanks to knbk for the report.
Diffstat (limited to 'tests')
-rw-r--r--tests/migrations/test_writer.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/migrations/test_writer.py b/tests/migrations/test_writer.py
index aa12c7c612..d2bd491635 100644
--- a/tests/migrations/test_writer.py
+++ b/tests/migrations/test_writer.py
@@ -351,6 +351,10 @@ class WriterTests(TestCase):
self.assertSerializedEqual(frozenset())
self.assertSerializedEqual(frozenset("let it go"))
+ def test_serialize_timedelta(self):
+ self.assertSerializedEqual(datetime.timedelta())
+ self.assertSerializedEqual(datetime.timedelta(minutes=42))
+
def test_simple_migration(self):
"""
Tests serializing a simple migration.