summaryrefslogtreecommitdiff
path: root/testing/test_soledad
diff options
context:
space:
mode:
Diffstat (limited to 'testing/test_soledad')
-rw-r--r--testing/test_soledad/u1db_tests/__init__.py9
-rw-r--r--testing/test_soledad/u1db_tests/test_https.py2
-rw-r--r--testing/test_soledad/util.py11
3 files changed, 16 insertions, 6 deletions
diff --git a/testing/test_soledad/u1db_tests/__init__.py b/testing/test_soledad/u1db_tests/__init__.py
index ba776864..36db548d 100644
--- a/testing/test_soledad/u1db_tests/__init__.py
+++ b/testing/test_soledad/u1db_tests/__init__.py
@@ -23,11 +23,16 @@ import socket
import tempfile
import threading
import json
+import sys
+from six import StringIO
from wsgiref import simple_server
-from pysqlcipher import dbapi2
-from StringIO import StringIO
+
+if sys.version_info[0] < 3:
+ from pysqlcipher import dbapi2
+else:
+ from pysqlcipher3 import dbapi2
import testscenarios
from twisted.trial import unittest
diff --git a/testing/test_soledad/u1db_tests/test_https.py b/testing/test_soledad/u1db_tests/test_https.py
index baffa723..2e75afd1 100644
--- a/testing/test_soledad/u1db_tests/test_https.py
+++ b/testing/test_soledad/u1db_tests/test_https.py
@@ -84,7 +84,7 @@ class TestHttpSyncTargetHttpsSupport(tests.TestCaseWithServer):
remote_target = self.getSyncTarget('localhost', 'test')
try:
remote_target.record_sync_info('other-id', 2, 'T-id')
- except ssl.SSLError, e:
+ except ssl.SSLError as e:
self.assertIn("certificate verify failed", str(e))
else:
self.fail("certificate verification should have failed.")
diff --git a/testing/test_soledad/util.py b/testing/test_soledad/util.py
index 83a27016..91291faf 100644
--- a/testing/test_soledad/util.py
+++ b/testing/test_soledad/util.py
@@ -24,12 +24,17 @@ import random
import string
import couchdb
import pytest
+import sys
+from six.moves.urllib.parse import urljoin
+from six import StringIO
from uuid import uuid4
from mock import Mock
-from urlparse import urljoin
-from StringIO import StringIO
-from pysqlcipher import dbapi2
+
+if sys.version_info[0] < 3:
+ from pysqlcipher import dbapi2
+else:
+ from pysqlcipher3 import dbapi2
from twisted.trial import unittest