Permalink
Browse files

Fix Layer2 unit test to use query result as a generator rather than a…

…ssume it is a list.
  • Loading branch information...
1 parent 423c9fc commit 4719049cfba9ecee4e491ebcc1e547108903eade @garnaat garnaat committed Jan 25, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 tests/dynamodb/test_layer2.py
@@ -177,7 +177,10 @@ def test_layer2_basic(self):
# Try a few queries
items = table.query('Amazon DynamoDB',
{'DynamoDB': 'BEGINS_WITH'})
- assert len(items) == 2
+ n = 0
+ for item in items:
+ n += 1
+ assert n == 2
# # Try a few scans
# result = c.scan(table_name,

0 comments on commit 4719049

Please sign in to comment.