diff --git a/alternator-test/conftest.py b/alternator-test/conftest.py index 5b822ce543..390d9dfe5b 100644 --- a/alternator-test/conftest.py +++ b/alternator-test/conftest.py @@ -135,9 +135,9 @@ def filled_test_table(dynamodb): 'another': "y" * 16 } for i in range(count)] - for item in items: - # TODO: eventually, when Alternator supports batch operations, - # use a batch write to make this fixture start faster. - table.put_item(Item=item) + with table.batch_writer() as batch: + for item in items: + batch.put_item(item) + yield table, items table.delete() diff --git a/alternator-test/test_item.py b/alternator-test/test_item.py index 275b105b04..4c71c92014 100644 --- a/alternator-test/test_item.py +++ b/alternator-test/test_item.py @@ -47,7 +47,6 @@ def test_basic_batch_write_item(dynamodb, test_table): for i in range(count): item = test_table.get_item(Key={'p': "batch{}".format(i), 'c': "batch_ck{}".format(i)}, ConsistentRead=True)['Item'] - print(item) assert item['p'] == "batch{}".format(i) assert item['c'] == "batch_ck{}".format(i) assert item['attribute'] == str(i)