Skip to content

Commit 2e4830f

Browse files
Adjust for Cyrus IMAP tests
1 parent 3023870 commit 2e4830f

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed

tests/storage/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,9 @@ async def test_case_sensitive_uids(self, s, get_item):
281281
async def test_specialchars(
282282
self, monkeypatch, requires_collections, get_storage_args, get_item
283283
):
284-
if getattr(self, "dav_server", "") in ("icloud", "fastmail"):
284+
if getattr(self, "dav_server", "") == "radicale":
285+
pytest.skip("Radicale is fundamentally broken.")
286+
if getattr(self, "dav_server", "") in ("icloud", "fastmail", "cyrus"):
285287
pytest.skip("iCloud and FastMail reject this name.")
286288

287289
monkeypatch.setattr("vdirsyncer.utils.generate_href", lambda x: x)
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import os
2+
3+
import pytest
4+
5+
6+
class ServerMixin:
7+
@pytest.fixture
8+
def get_storage_args(self, item_type, slow_create_collection):
9+
def inner(collection="test"):
10+
url1 = "http://127.0.0.3/dav/calendars/"
11+
url2 = "https://udoma.bapha.be/dav/calendars/"
12+
args = {
13+
"username": "[email protected]",
14+
"password": "abc",
15+
}
16+
17+
if self.storage_class.fileext == ".ics":
18+
args["url"] = url2
19+
elif self.storage_class.fileext == ".vcf":
20+
args["url"] = url2
21+
else:
22+
raise RuntimeError()
23+
24+
if collection is not None:
25+
args = slow_create_collection(self.storage_class, args, collection)
26+
return args
27+
28+
return inner

0 commit comments

Comments
 (0)