Skip to content

Commit

Permalink
add tzinfo
Browse files Browse the repository at this point in the history
  • Loading branch information
jpinner-lyft committed Oct 14, 2020
1 parent 9ff4ebf commit 1b5e085
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -884,7 +884,7 @@ class CreatedAtMap(DynamicMapAttribute):

def test_serialize(self):
test_model = TestDynamicMapAttribute.TestModel()
test_model.test_map.created_at = datetime(2017, 1, 1)
test_model.test_map.created_at = datetime(2017, 1, 1, tzinfo=timezone.utc)
test_model.test_map.foo = 'bar'
test_model.test_map.empty = None
assert test_model.serialize() == {'test_map': {'M': {
Expand All @@ -901,7 +901,7 @@ def test_deserialize(self):
}}}
test_model = TestDynamicMapAttribute.TestModel()
test_model.deserialize(serialized)
assert test_model.test_map.created_at == datetime(2017, 1, 1)
assert test_model.test_map.created_at == datetime(2017, 1, 1, tzinfo=timezone.utc)
assert test_model.test_map.foo == 'bar'
assert test_model.test_map.empty is None

Expand Down

0 comments on commit 1b5e085

Please sign in to comment.