Mercurial > libervia-backend
diff tests/e2e/libervia-cli/test_libervia-cli.py @ 3658:9e491b2bab88
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.
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 08 Sep 2021 11:17:51 +0200 |
parents | d78b5eae912a |
children | eeb8be32d644 |
line wrap: on
line diff
--- 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