This commit is contained in:
Markus Unterwaditzer 2014-03-21 17:43:04 +01:00
parent ab77840b5e
commit 7bc6c41164
3 changed files with 12 additions and 9 deletions

View file

@ -13,7 +13,10 @@ from vdirsyncer.utils import expand_path
import subprocess import subprocess
import os import os
owncloud_repo = expand_path(os.path.join(os.path.dirname(__file__), '../../../owncloud-testserver/')) owncloud_repo = expand_path(os.path.join(
os.path.dirname(__file__), '../../../owncloud-testserver/'
))
class ServerMixin(object): class ServerMixin(object):
storage_class = None storage_class = None
@ -36,4 +39,5 @@ class ServerMixin(object):
'test5', 'test6', 'test7', 'test8', 'test9', 'test5', 'test6', 'test7', 'test8', 'test9',
'test10') 'test10')
return {'url': url, 'collection': collection, 'username': 'asdf', 'password': 'asdf'} return {'url': url, 'collection': collection,
'username': 'asdf', 'password': 'asdf'}

View file

@ -22,8 +22,6 @@ import mock
from werkzeug.test import Client from werkzeug.test import Client
from werkzeug.wrappers import BaseResponse as WerkzeugResponse from werkzeug.wrappers import BaseResponse as WerkzeugResponse
import vdirsyncer.exceptions as exceptions
from vdirsyncer.storage.base import Item
RADICALE_SCHEMA = ''' RADICALE_SCHEMA = '''
create table collection ( create table collection (
@ -120,6 +118,7 @@ class Response(object):
def wsgi_setup(app): def wsgi_setup(app):
c = Client(app, WerkzeugResponse) c = Client(app, WerkzeugResponse)
def x(session, method, url, data=None, headers=None, **kw): def x(session, method, url, data=None, headers=None, **kw):
path = urlparse.urlparse(url).path path = urlparse.urlparse(url).path
assert isinstance(data, bytes) or data is None assert isinstance(data, bytes) or data is None