Switch to aware datetimes in test.
This commit is contained in:
parent
86d9b10dc3
commit
8a842148b6
|
@ -293,16 +293,16 @@ class TestSerialization(TestCase):
|
||||||
test_data = (
|
test_data = (
|
||||||
'[{"fields": {"ints": "{\\"upper\\": \\"10\\", \\"lower\\": \\"0\\", '
|
'[{"fields": {"ints": "{\\"upper\\": \\"10\\", \\"lower\\": \\"0\\", '
|
||||||
'\\"bounds\\": \\"[)\\"}", "floats": "{\\"empty\\": true}", '
|
'\\"bounds\\": \\"[)\\"}", "floats": "{\\"empty\\": true}", '
|
||||||
'"bigints": null, "timestamps": "{\\"upper\\": \\"2014-02-02T12:12:12\\", '
|
'"bigints": null, "timestamps": "{\\"upper\\": \\"2014-02-02T12:12:12+00:00\\", '
|
||||||
'\\"lower\\": \\"2014-01-01T00:00:00\\", \\"bounds\\": \\"[)\\"}", '
|
'\\"lower\\": \\"2014-01-01T00:00:00+00:00\\", \\"bounds\\": \\"[)\\"}", '
|
||||||
'"dates": "{\\"upper\\": \\"2014-02-02\\", \\"lower\\": \\"2014-01-01\\", \\"bounds\\": \\"[)\\"}" }, '
|
'"dates": "{\\"upper\\": \\"2014-02-02\\", \\"lower\\": \\"2014-01-01\\", \\"bounds\\": \\"[)\\"}" }, '
|
||||||
'"model": "postgres_tests.rangesmodel", "pk": null}]'
|
'"model": "postgres_tests.rangesmodel", "pk": null}]'
|
||||||
)
|
)
|
||||||
|
|
||||||
lower_date = datetime.date(2014, 1, 1)
|
lower_date = datetime.date(2014, 1, 1)
|
||||||
upper_date = datetime.date(2014, 2, 2)
|
upper_date = datetime.date(2014, 2, 2)
|
||||||
lower_dt = datetime.datetime(2014, 1, 1, 0, 0, 0)
|
lower_dt = datetime.datetime(2014, 1, 1, 0, 0, 0, tzinfo=timezone.utc)
|
||||||
upper_dt = datetime.datetime(2014, 2, 2, 12, 12, 12)
|
upper_dt = datetime.datetime(2014, 2, 2, 12, 12, 12, tzinfo=timezone.utc)
|
||||||
|
|
||||||
def test_dumping(self):
|
def test_dumping(self):
|
||||||
instance = RangesModel(ints=NumericRange(0, 10), floats=NumericRange(empty=True),
|
instance = RangesModel(ints=NumericRange(0, 10), floats=NumericRange(empty=True),
|
||||||
|
|
Loading…
Reference in New Issue