summaryrefslogtreecommitdiff
path: root/testing/tests/server/test_server.py
diff options
context:
space:
mode:
authordrebs <drebs@leap.se>2016-11-17 10:12:38 -0200
committerdrebs <drebs@leap.se>2016-11-17 10:12:38 -0200
commit3183e473748390927ea466ce72277465b28b4430 (patch)
treeca0f58801653801c5cb30f27b0404377d42fa72a /testing/tests/server/test_server.py
parentd77c3868bd02bbd59965498d6d1a0b59f0512338 (diff)
parent0fd7e9f018b02161a844c11332ffced56b256010 (diff)
Merge tag '0.9.0' into debian/platform-0.9
Tag version 0.9.0
Diffstat (limited to 'testing/tests/server/test_server.py')
-rw-r--r--testing/tests/server/test_server.py14
1 files changed, 5 insertions, 9 deletions
diff --git a/testing/tests/server/test_server.py b/testing/tests/server/test_server.py
index b99d1939..6bbcf002 100644
--- a/testing/tests/server/test_server.py
+++ b/testing/tests/server/test_server.py
@@ -20,7 +20,7 @@ Tests for server-related functionality.
import binascii
import mock
import os
-import tempfile
+import pytest
from hashlib import sha512
from pkg_resources import resource_filename
@@ -43,8 +43,8 @@ from test_soledad.util import (
from leap.soledad.common import crypto
from leap.soledad.client import Soledad
-from leap.soledad.server import load_configuration
-from leap.soledad.server import CONFIG_DEFAULTS
+from leap.soledad.server.config import load_configuration
+from leap.soledad.server.config import CONFIG_DEFAULTS
from leap.soledad.server.auth import URLToAuthorization
from leap.soledad.server.auth import SoledadTokenAuthMiddleware
@@ -287,6 +287,7 @@ class ServerAuthorizationTestCase(BaseSoledadTest):
self._make_environ('/%s/sync-from/x' % dbname, 'POST')))
+@pytest.mark.usefixtures("method_tmpdir")
class EncryptedSyncTestCase(
CouchDBTestCase, TestCaseWithServer):
@@ -349,11 +350,7 @@ class EncryptedSyncTestCase(
return self.make_app_with_state(self.request_state)
def setUp(self):
- # the order of the following initializations is crucial because of
- # dependencies.
- # XXX explain better
CouchDBTestCase.setUp(self)
- self.tempdir = tempfile.mkdtemp(prefix="leap_tests-")
TestCaseWithServer.setUp(self)
def tearDown(self):
@@ -391,8 +388,7 @@ class EncryptedSyncTestCase(
# ensure remote db exists before syncing
db = CouchDatabase.open_database(
urljoin(self.couch_url, 'user-' + user),
- create=True,
- ensure_ddocs=True)
+ create=True)
def _db1AssertEmptyDocList(results):
_, doclist = results