mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-04-27 14:57:41 +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
|
|
@ -312,11 +312,18 @@ class StorageTests:
|
||||||
assert urlquote(uid, "/@:") in href
|
assert urlquote(uid, "/@:") in href
|
||||||
|
|
||||||
@pytest.mark.asyncio
|
@pytest.mark.asyncio
|
||||||
async def test_metadata(self, requires_metadata, s):
|
async def test_empty_metadata(self, requires_metadata, s):
|
||||||
if not getattr(self, "dav_server", ""):
|
if getattr(self, "dav_server", ""):
|
||||||
|
pytest.skip()
|
||||||
|
|
||||||
assert await s.get_meta("color") is None
|
assert await s.get_meta("color") is None
|
||||||
assert await s.get_meta("displayname") is None
|
assert await s.get_meta("displayname") is None
|
||||||
|
|
||||||
|
@pytest.mark.asyncio
|
||||||
|
async def test_metadata(self, requires_metadata, s):
|
||||||
|
if getattr(self, "dav_server", "") == "xandikos":
|
||||||
|
pytest.skip("xandikos does not support removing metadata.")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
await s.set_meta("color", None)
|
await s.set_meta("color", None)
|
||||||
assert await s.get_meta("color") is None
|
assert await s.get_meta("color") is None
|
||||||
|
|
@ -325,6 +332,8 @@ class StorageTests:
|
||||||
except exceptions.UnsupportedMetadataError:
|
except exceptions.UnsupportedMetadataError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@pytest.mark.asyncio
|
||||||
|
async def test_encoding_metadata(self, requires_metadata, s):
|
||||||
for x in ("hello world", "hello wörld"):
|
for x in ("hello world", "hello wörld"):
|
||||||
await s.set_meta("displayname", x)
|
await s.set_meta("displayname", x)
|
||||||
rv = await s.get_meta("displayname")
|
rv = await s.get_meta("displayname")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue