Skip to content

Commit

Permalink
add iter test
Browse files Browse the repository at this point in the history
  • Loading branch information
jpinner-lyft committed Oct 7, 2017
1 parent b18bd55 commit 5f21e27
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions pynamodb/tests/test_attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,18 @@ def test_raw_map_access(self):
for k, v in six.iteritems(raw):
assert attr[k] == v

def test_raw_map_iter(self):
raw = {
"foo": "bar",
"num": 3,
"nested": {
"nestedfoo": "nestedbar"
}
}
attr = MapAttribute(**raw)

assert list(iter(raw)) == list(iter(attr))

def test_raw_map_json_serialize(self):
raw = {
"foo": "bar",
Expand Down

0 comments on commit 5f21e27

Please sign in to comment.