From 2eff8e08e1e16463e526503db46ae5c21138d776 Mon Sep 17 00:00:00 2001 From: Hugo Osvaldo Barrera Date: Sat, 26 Jun 2021 18:12:22 +0200 Subject: [PATCH] Fix breakage in Fastmail tests Some code that wasn't updated with the switch to asyncio. --- tests/storage/servers/fastmail/__init__.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/storage/servers/fastmail/__init__.py b/tests/storage/servers/fastmail/__init__.py index a847fdd..3935c40 100644 --- a/tests/storage/servers/fastmail/__init__.py +++ b/tests/storage/servers/fastmail/__init__.py @@ -5,7 +5,7 @@ import pytest class ServerMixin: @pytest.fixture - def get_storage_args(self, item_type, slow_create_collection): + def get_storage_args(self, item_type, slow_create_collection, aio_connector): if item_type == "VTODO": # Fastmail has non-standard support for TODOs # See https://github.com/pimutils/vdirsyncer/issues/824 @@ -15,6 +15,7 @@ class ServerMixin: args = { "username": os.environ["FASTMAIL_USERNAME"], "password": os.environ["FASTMAIL_PASSWORD"], + "connector": aio_connector, } if self.storage_class.fileext == ".ics": @@ -25,7 +26,12 @@ class ServerMixin: raise RuntimeError() if collection is not None: - args = slow_create_collection(self.storage_class, args, collection) + args = await slow_create_collection( + self.storage_class, + args, + collection, + ) + return args return inner