Skip to content

Commit

Permalink
Merge pull request #11 from dhermes/fix-json-string-order
Browse files Browse the repository at this point in the history
Fixing non-deterministic dict. failure in extra_types_test.
  • Loading branch information
craigcitro committed Mar 31, 2015
2 parents c431900 + b3947f2 commit 74c7af5
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions apitools/base/py/extra_types_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,12 @@ class DateMsg(messages.Message):
datetime.date(1980, 10, 24),
datetime.date(1981, 1, 19),
])
json_msg = json.dumps({
'start_date': '1752-09-09', 'all_dates': [
'1979-05-06', '1980-10-24', '1981-01-19',
]})
self.assertEqual(json_msg, encoding.MessageToJson(msg))
self.assertEqual(msg, encoding.JsonToMessage(DateMsg, json_msg))
msg_dict = {
'start_date': '1752-09-09',
'all_dates': ['1979-05-06', '1980-10-24', '1981-01-19'],
}
self.assertEqual(msg_dict, json.loads(encoding.MessageToJson(msg)))
self.assertEqual(msg, encoding.JsonToMessage(DateMsg, json.dumps(msg_dict)))

def testInt64(self):
# Testing roundtrip of type 'long'
Expand Down

0 comments on commit 74c7af5

Please sign in to comment.