# HG changeset patch # User Goffi # Date 1631092671 -7200 # Node ID 9e491b2bab8881c4ad100d0c0f9f94b86e4454b9 # Parent 6c87c00b344a2b3562f01a83fde66d2553660e05 test (e2e/cli): use `max_items` instead of `max` when retrieving blog items: RSM `max` alone will return first (oldest) items, while `max_items` will return latest ones. As Libervia Pubsub as been fixed in this regard, tests are now fixed too. diff -r 6c87c00b344a -r 9e491b2bab88 tests/e2e/libervia-cli/test_libervia-cli.py --- a/tests/e2e/libervia-cli/test_libervia-cli.py Wed Sep 08 11:17:43 2021 +0200 +++ b/tests/e2e/libervia-cli/test_libervia-cli.py Wed Sep 08 11:17:51 2021 +0200 @@ -176,7 +176,7 @@ li.blog.edit(_env=editor.env) assert len(editor.original_content) == 0 assert editor.new_content == payload_md - items_data = li_json.blog.get(max=1) + items_data = li_json.blog.get(max_items=1) last_item = items_data[0][0] last_item_id = last_item['id'] assert last_item['content'] == "content in markdown" @@ -187,7 +187,7 @@ li.blog.edit("--last-item", _env=editor.env) assert editor.original_content == payload_md assert editor.new_content == f"{payload_md} extended" - items_data = li_json.blog.get(max=1) + items_data = li_json.blog.get(max_items=1) last_item = items_data[0][0] # we check that the id hasn't been modified assert last_item['id'] == last_item_id