From 29e76c1adbd7bc3f08ea271590709575794db9b1 Mon Sep 17 00:00:00 2001 From: Goffi Date: Wed, 8 Sep 2021 11:17:51 +0200 Subject: [PATCH] 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. --- tests/e2e/libervia-cli/test_libervia-cli.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/e2e/libervia-cli/test_libervia-cli.py b/tests/e2e/libervia-cli/test_libervia-cli.py index 90fd756b..93235ddc 100644 --- a/tests/e2e/libervia-cli/test_libervia-cli.py +++ b/tests/e2e/libervia-cli/test_libervia-cli.py @@ -176,7 +176,7 @@ class TestLiberviaCliBlog: 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 @@ class TestLiberviaCliBlog: 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