diff options
| author | Baptiste Mispelon <bmispelon@gmail.com> | 2015-04-02 16:49:41 +0200 |
|---|---|---|
| committer | Baptiste Mispelon <bmispelon@gmail.com> | 2015-04-02 17:41:08 +0200 |
| commit | 09188b50247fe3efa1d22cd3f9971bf4589e7cbe (patch) | |
| tree | 7d54fb1d74738bdd681d1b9e4a1dd9532fe3dab0 /tests/migrations | |
| parent | e7366ab1f908b8cbf8d7e83037b5f17d101b5ade (diff) | |
[1.8.x] Fixed #24566 -- Added support for serializing timedelta
Thanks to knbk for the report.
Backport of 30a3c2f74c030449d3a8b9f02ab6744874712e54 from master.
Diffstat (limited to 'tests/migrations')
| -rw-r--r-- | tests/migrations/test_writer.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/migrations/test_writer.py b/tests/migrations/test_writer.py index 79a374b567..4573bda3f0 100644 --- a/tests/migrations/test_writer.py +++ b/tests/migrations/test_writer.py @@ -339,6 +339,11 @@ class WriterTests(TestCase): self.assertSerializedEqual(FoodManager('a', 'b')) self.assertSerializedEqual(FoodManager('x', 'y', c=3, d=4)) + + 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. |
