[pim/akonadi-e2e-tests] tests/imap: Make sure we always test the case of the collection becoming empty

Kevin Ottens <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 5f964b22b75889c40c5ef9ec856c7d138e44780b by Kevin Ottens.
Committed on 17/07/2026 at 10:09.
Pushed by ervin into branch 'master'.

Make sure we always test the case of the collection becoming empty

This is a special code path in the resource, so let's make sure we
exercise it.

M  +3    -2    tests/imap/test_server_to_resource_imap.py

https://invent.kde.org/pim/akonadi-e2e-tests/-/commit/5f964b22b75889c40c5ef9ec856c7d138e44780b

diff --git a/tests/imap/test_server_to_resource_imap.py b/tests/imap/test_server_to_resource_imap.py
index 2b0eec5..bee3789 100644
--- a/tests/imap/test_server_to_resource_imap.py
+++ b/tests/imap/test_server_to_resource_imap.py
@@ -392,13 +392,14 @@ def test_offline_change_email_flags_on_server_is_synced(
     assert_all_collections_are_equals(imap_client, imap_resource)
 
 
[email protected]("init_items_count", [1, fake.random_int(min=2, max=8)])
 def test_offline_removed_message_server_side(
-    imap_resource: ImapResource, imap_client: BaseMailBox
+    imap_resource: ImapResource, imap_client: BaseMailBox, init_items_count: int
 ) -> None:
     """
     Removing a message on the server while offline, the message is removed in the resource when online
     """
-    folder = ImapFolderFactory.create()
+    folder = ImapFolderFactory.create(nb_items=init_items_count)
     imap_resource.synchronize()
     assert_collection_equal_mailbox(folder.name, imap_resource, imap_client)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.