From 02fa630a3c88be0d9c104eda12964f4a01084e25 Mon Sep 17 00:00:00 2001 From: Steve Pulec Date: Sat, 3 Aug 2013 17:27:34 -0400 Subject: [PATCH] Fix dynamo batch length --- tests/test_dynamodb/test_dynamodb_table_with_range_key.py | 4 +++- tests/test_dynamodb/test_dynamodb_table_without_range_key.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/test_dynamodb/test_dynamodb_table_with_range_key.py b/tests/test_dynamodb/test_dynamodb_table_with_range_key.py index 0b5e56b20..12700707c 100644 --- a/tests/test_dynamodb/test_dynamodb_table_with_range_key.py +++ b/tests/test_dynamodb/test_dynamodb_table_with_range_key.py @@ -500,4 +500,6 @@ def test_batch_read(): item.put() items = table.batch_get_item([('the-key', '123'), ('another-key', '789')]) - items.should.have.length_ofl(2) + # Iterate through so that batch_item gets called + count = len([x for x in items]) + count.should.equal(2) diff --git a/tests/test_dynamodb/test_dynamodb_table_without_range_key.py b/tests/test_dynamodb/test_dynamodb_table_without_range_key.py index a3546bbce..81e76f7f8 100644 --- a/tests/test_dynamodb/test_dynamodb_table_without_range_key.py +++ b/tests/test_dynamodb/test_dynamodb_table_without_range_key.py @@ -411,4 +411,6 @@ def test_batch_read(): item.put() items = table.batch_get_item([('the-key1'), ('another-key')]) - items.should.have.length_of(2) + # Iterate through so that batch_item gets called + count = len([x for x in items]) + count.should.have.equal(2)