summaryrefslogtreecommitdiff
path: root/tests/postgres_tests
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2015-06-06 13:05:29 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2015-06-06 13:05:29 +0100
commit8a842148b6deaab021526e2689279cf5e232945f (patch)
tree35439b6a79126080bbc7cb8ce1de41d639be5528 /tests/postgres_tests
parent86d9b10dc33cc115fee2ecab40a569354ac55d15 (diff)
Switch to aware datetimes in test.
Diffstat (limited to 'tests/postgres_tests')
-rw-r--r--tests/postgres_tests/test_ranges.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/postgres_tests/test_ranges.py b/tests/postgres_tests/test_ranges.py
index b3b591f4e4..7d7fb33c4d 100644
--- a/tests/postgres_tests/test_ranges.py
+++ b/tests/postgres_tests/test_ranges.py
@@ -293,16 +293,16 @@ class TestSerialization(TestCase):
test_data = (
'[{"fields": {"ints": "{\\"upper\\": \\"10\\", \\"lower\\": \\"0\\", '
'\\"bounds\\": \\"[)\\"}", "floats": "{\\"empty\\": true}", '
- '"bigints": null, "timestamps": "{\\"upper\\": \\"2014-02-02T12:12:12\\", '
- '\\"lower\\": \\"2014-01-01T00:00:00\\", \\"bounds\\": \\"[)\\"}", '
+ '"bigints": null, "timestamps": "{\\"upper\\": \\"2014-02-02T12:12:12+00:00\\", '
+ '\\"lower\\": \\"2014-01-01T00:00:00+00:00\\", \\"bounds\\": \\"[)\\"}", '
'"dates": "{\\"upper\\": \\"2014-02-02\\", \\"lower\\": \\"2014-01-01\\", \\"bounds\\": \\"[)\\"}" }, '
'"model": "postgres_tests.rangesmodel", "pk": null}]'
)
lower_date = datetime.date(2014, 1, 1)
upper_date = datetime.date(2014, 2, 2)
- lower_dt = datetime.datetime(2014, 1, 1, 0, 0, 0)
- upper_dt = datetime.datetime(2014, 2, 2, 12, 12, 12)
+ lower_dt = datetime.datetime(2014, 1, 1, 0, 0, 0, tzinfo=timezone.utc)
+ upper_dt = datetime.datetime(2014, 2, 2, 12, 12, 12, tzinfo=timezone.utc)
def test_dumping(self):
instance = RangesModel(ints=NumericRange(0, 10), floats=NumericRange(empty=True),