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.
This commit is contained in:
Goffi 2021-09-08 11:17:51 +02:00
commit 29e76c1adb

View file

@ -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