mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-03-25 08:55:50 +00:00
Skip test on unsupported servers
This commit is contained in:
parent
c0ccb3d1aa
commit
7379a96f73
1 changed files with 12 additions and 3 deletions
|
|
@ -311,11 +311,18 @@ class StorageTests:
|
|||
if self.storage_class.storage_name.endswith("dav"):
|
||||
assert urlquote(uid, "/@:") in href
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_empty_metadata(self, requires_metadata, s):
|
||||
if getattr(self, "dav_server", ""):
|
||||
pytest.skip()
|
||||
|
||||
assert await s.get_meta("color") is None
|
||||
assert await s.get_meta("displayname") is None
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_metadata(self, requires_metadata, s):
|
||||
if not getattr(self, "dav_server", ""):
|
||||
assert await s.get_meta("color") is None
|
||||
assert await s.get_meta("displayname") is None
|
||||
if getattr(self, "dav_server", "") == "xandikos":
|
||||
pytest.skip("xandikos does not support removing metadata.")
|
||||
|
||||
try:
|
||||
await s.set_meta("color", None)
|
||||
|
|
@ -325,6 +332,8 @@ class StorageTests:
|
|||
except exceptions.UnsupportedMetadataError:
|
||||
pass
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_encoding_metadata(self, requires_metadata, s):
|
||||
for x in ("hello world", "hello wörld"):
|
||||
await s.set_meta("displayname", x)
|
||||
rv = await s.get_meta("displayname")
|
||||
|
|
|
|||
Loading…
Reference in a new issue