Skip to content

Commit

Permalink
Fix for test when dict ordering differs (#237)
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonfriedland authored and danielhochman committed Mar 16, 2017
1 parent e94d496 commit 652af14
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pynamodb/tests/test_attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -613,11 +613,11 @@ def test_raw_map_json_serialize(self):
}
}

serialized_raw = json.dumps(raw)
self.assertEqual(json.dumps(AttributeTestModel(map_attr=raw).map_attr.as_dict()),
serialized_raw)
self.assertEqual(json.dumps(AttributeTestModel(map_attr=MapAttribute(**raw)).map_attr.as_dict()),
serialized_raw)
serialized_raw = json.dumps(raw, sort_keys=True)
self.assertEqual(json.dumps(AttributeTestModel(map_attr=raw).map_attr.as_dict(),
sort_keys=True), serialized_raw)
self.assertEqual(json.dumps(AttributeTestModel(map_attr=MapAttribute(**raw)).map_attr.as_dict(),
sort_keys=True), serialized_raw)

def test_typed_and_raw_map_json_serialize(self):
class TypedMap(MapAttribute):
Expand Down

0 comments on commit 652af14

Please sign in to comment.