mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-03-26 09:05:50 +00:00
* Port http storage to rust (#729) * Port http storage to rust * implement rest of parameters as far as possible * stylefixes * rustup * fix invalid timestamp * fix header file * Fix compilation errors * basic impl of dav * dockerize xandikos * add xandikos build * Fix circleci build * Fix circleci config * fix nextcloud port * stylefix * implement upload, upload, delete in rust * fix exc handling * python stylefixes * move caldav.list to rust * fix exc again (fastmail) * stylefixes * add basic logging, fix fastmail * stylefixes * fix tests for etag=None (icloud) * overwrite busted cargo-install-update * install clippy from git * fix rustfmt * rustfmt * clear cache
29 lines
830 B
Python
29 lines
830 B
Python
import os
|
|
import requests
|
|
import pytest
|
|
|
|
|
|
port = os.environ.get('NEXTCLOUD_HOST', None) or 'localhost:5000'
|
|
user = os.environ.get('NEXTCLOUD_USER', None) or 'asdf'
|
|
pwd = os.environ.get('NEXTCLOUD_PASS', None) or 'asdf'
|
|
|
|
|
|
class ServerMixin(object):
|
|
storage_class = None
|
|
wsgi_teardown = None
|
|
|
|
@pytest.fixture
|
|
def get_storage_args(self, item_type,
|
|
slow_create_collection):
|
|
def inner(collection='test'):
|
|
args = {
|
|
'username': user,
|
|
'password': pwd,
|
|
'url': 'http://{}/remote.php/dav/'.format(port)
|
|
}
|
|
|
|
if collection is not None:
|
|
args = slow_create_collection(self.storage_class, args,
|
|
collection)
|
|
return args
|
|
return inner
|