From 9f14d13163508cb181b919b7ff2535bcd2578267 Mon Sep 17 00:00:00 2001 From: Jeff Gregory Date: Mon, 3 Mar 2014 13:49:08 -0800 Subject: [PATCH] tests for reverse query order --- tests/test_dynamodb2/test_dynamodb_table_with_range_key.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_dynamodb2/test_dynamodb_table_with_range_key.py b/tests/test_dynamodb2/test_dynamodb_table_with_range_key.py index 0b8ce61c0..47d283396 100644 --- a/tests/test_dynamodb2/test_dynamodb_table_with_range_key.py +++ b/tests/test_dynamodb2/test_dynamodb_table_with_range_key.py @@ -261,6 +261,10 @@ def test_query(): for index, item in enumerate(results): item["subject"].should.equal(expected[index]) + results = table.query(forum_name__eq="the-key", subject__gt='1', reverse=True) + for index, item in enumerate(results): + item["subject"].should.equal(expected[len(expected)-1-index]) + results = table.query(forum_name__eq='the-key', subject__gt='1',consistent=True) sum(1 for _ in results).should.equal(3)