File: test_remotestorage.py

package info (click to toggle)
vdirsyncer 0.14.1-1%2Bdeb9u1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 848 kB
  • sloc: python: 6,664; makefile: 243; sh: 59
file content (35 lines) | stat: -rw-r--r-- 827 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# -*- coding: utf-8 -*-


import os

import pytest

from vdirsyncer.storage.remotestorage import \
    RemoteStorageCalendars, RemoteStorageContacts

from . import StorageTests, get_server_mixin

remotestorage_server = os.environ['REMOTESTORAGE_SERVER']
ServerMixin = get_server_mixin(remotestorage_server)


class RemoteStorageTests(ServerMixin, StorageTests):
    remotestorage_server = remotestorage_server


class TestCalendars(RemoteStorageTests):
    storage_class = RemoteStorageCalendars

    @pytest.fixture(params=['VTODO', 'VEVENT'])
    def item_type(self, request):
        return request.param


class TestContacts(RemoteStorageTests):
    storage_class = RemoteStorageContacts
    supports_collections = False

    @pytest.fixture(params=['VCARD'])
    def item_type(self, request):
        return request.param