summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@cepl.eu>2021-01-14 13:31:38 +0100
committerMatěj Cepl <mcepl@cepl.eu>2021-01-14 14:31:04 +0100
commitae73548cf705d2c603b6f1d7f9a140940def837c (patch)
tree0157642befa6435188595eddf5c3bd769b964857
parent5541bb16cec1623be63188f25048cdb75ab26843 (diff)
downloadm2crypto-ae73548cf705d2c603b6f1d7f9a140940def837c.tar.gz
Replace 'from . import' with absolute imports.
-rw-r--r--tests/test_aes.py2
-rw-r--r--tests/test_asn1.py2
-rwxr-xr-xtests/test_authcookie.py2
-rw-r--r--tests/test_bio.py2
-rw-r--r--tests/test_bio_file.py2
-rw-r--r--tests/test_bio_iobuf.py2
-rw-r--r--tests/test_bio_membuf.py2
-rw-r--r--tests/test_bio_ssl.py2
-rw-r--r--tests/test_bn.py2
-rw-r--r--tests/test_dh.py2
-rw-r--r--tests/test_dsa.py2
-rw-r--r--tests/test_ec_curves.py2
-rw-r--r--tests/test_ecdh.py2
-rw-r--r--tests/test_ecdsa.py2
-rw-r--r--tests/test_engine.py2
-rw-r--r--tests/test_err.py2
-rw-r--r--tests/test_evp.py2
-rw-r--r--tests/test_obj.py2
-rw-r--r--tests/test_rand.py2
-rw-r--r--tests/test_rc4.py2
-rw-r--r--tests/test_rsa.py2
-rw-r--r--tests/test_smime.py2
-rw-r--r--tests/test_ssl.py2
-rw-r--r--tests/test_ssl_offline.py2
-rw-r--r--tests/test_threading.py2
-rw-r--r--tests/test_timeout.py2
-rw-r--r--tests/test_util.py2
-rw-r--r--tests/test_x509.py2
28 files changed, 28 insertions, 28 deletions
diff --git a/tests/test_aes.py b/tests/test_aes.py
index 08858db..8c75913 100644
--- a/tests/test_aes.py
+++ b/tests/test_aes.py
@@ -7,7 +7,7 @@ Copyright (c) 2018 Matej Cepl. All rights reserved.
import logging
from M2Crypto import m2
-from . import unittest
+from tests import unittest
log = logging.getLogger('test_AES')
diff --git a/tests/test_asn1.py b/tests/test_asn1.py
index 95f7ea4..09ed8e6 100644
--- a/tests/test_asn1.py
+++ b/tests/test_asn1.py
@@ -8,7 +8,7 @@ import datetime
import time
from M2Crypto import ASN1, m2
-from . import unittest
+from tests import unittest
class ASN1TestCase(unittest.TestCase):
diff --git a/tests/test_authcookie.py b/tests/test_authcookie.py
index 0bd89f6..953e1cf 100755
--- a/tests/test_authcookie.py
+++ b/tests/test_authcookie.py
@@ -10,7 +10,7 @@ import time
from M2Crypto import EVP, Rand, six, util
from M2Crypto.AuthCookie import AuthCookie, AuthCookieJar, mix, unmix, unmix3
from M2Crypto.six.moves.http_cookies import SimpleCookie # pylint: disable=no-name-in-module,import-error
-from . import unittest
+from tests import unittest
log = logging.getLogger(__name__)
diff --git a/tests/test_bio.py b/tests/test_bio.py
index 95c3bde..a70dd73 100644
--- a/tests/test_bio.py
+++ b/tests/test_bio.py
@@ -13,7 +13,7 @@ import logging
from parameterized import parameterized
from M2Crypto import BIO, Rand
-from . import unittest
+from tests import unittest
from .fips import fips_mode
log = logging.getLogger('test_bio')
diff --git a/tests/test_bio_file.py b/tests/test_bio_file.py
index f10948f..3335513 100644
--- a/tests/test_bio_file.py
+++ b/tests/test_bio_file.py
@@ -13,7 +13,7 @@ if platform.system() == 'Windows':
import ctypes.wintypes
from M2Crypto.BIO import File, openfile
-from . import unittest
+from tests import unittest
log = logging.getLogger(__name__)
diff --git a/tests/test_bio_iobuf.py b/tests/test_bio_iobuf.py
index 9fc4181..17a7e9a 100644
--- a/tests/test_bio_iobuf.py
+++ b/tests/test_bio_iobuf.py
@@ -7,7 +7,7 @@ Copyright (c) 2000 Ng Pheng Siong. All rights reserved."""
from io import BytesIO
from M2Crypto.BIO import IOBuffer, MemoryBuffer
-from . import unittest
+from tests import unittest
class IOBufferTestCase(unittest.TestCase):
diff --git a/tests/test_bio_membuf.py b/tests/test_bio_membuf.py
index ebac7b7..16e9c03 100644
--- a/tests/test_bio_membuf.py
+++ b/tests/test_bio_membuf.py
@@ -8,7 +8,7 @@ import os
import multiprocessing
from M2Crypto.BIO import MemoryBuffer
-from . import unittest
+from tests import unittest
class TimeLimitExpired(Exception):
diff --git a/tests/test_bio_ssl.py b/tests/test_bio_ssl.py
index 9b2b45e..ed2ea1a 100644
--- a/tests/test_bio_ssl.py
+++ b/tests/test_bio_ssl.py
@@ -15,7 +15,7 @@ from M2Crypto import Err
from M2Crypto import Rand
from M2Crypto import threading as m2threading
-from . import unittest
+from tests import unittest
from tests.test_ssl import srv_host, allocate_srv_port
diff --git a/tests/test_bn.py b/tests/test_bn.py
index aa3065e..f785bc8 100644
--- a/tests/test_bn.py
+++ b/tests/test_bn.py
@@ -10,7 +10,7 @@ import re
import warnings
from M2Crypto import BN, Rand
-from . import unittest
+from tests import unittest
loops = 16
diff --git a/tests/test_dh.py b/tests/test_dh.py
index d439cb4..747239f 100644
--- a/tests/test_dh.py
+++ b/tests/test_dh.py
@@ -5,7 +5,7 @@
Copyright (c) 2000 Ng Pheng Siong. All rights reserved."""
from M2Crypto import DH, BIO, Rand
-from . import unittest
+from tests import unittest
class DHTestCase(unittest.TestCase):
diff --git a/tests/test_dsa.py b/tests/test_dsa.py
index 140ce99..926fe52 100644
--- a/tests/test_dsa.py
+++ b/tests/test_dsa.py
@@ -7,7 +7,7 @@ Copyright (c) 2000 Ng Pheng Siong. All rights reserved."""
import hashlib
from M2Crypto import DSA, Rand
-from . import unittest
+from tests import unittest
class DSATestCase(unittest.TestCase):
diff --git a/tests/test_ec_curves.py b/tests/test_ec_curves.py
index 3f36356..3f4ffd2 100644
--- a/tests/test_ec_curves.py
+++ b/tests/test_ec_curves.py
@@ -22,7 +22,7 @@ from __future__ import absolute_import
import logging
from M2Crypto import EC, Rand, m2 # noqa
-from . import unittest
+from tests import unittest
log = logging.getLogger(__name__)
diff --git a/tests/test_ecdh.py b/tests/test_ecdh.py
index dc92dae..6813001 100644
--- a/tests/test_ecdh.py
+++ b/tests/test_ecdh.py
@@ -9,7 +9,7 @@ rights reserved.
from M2Crypto import EC, Rand
-from . import unittest
+from tests import unittest
from tests.test_ec_curves import tested_curve
diff --git a/tests/test_ecdsa.py b/tests/test_ecdsa.py
index 7dfd044..2c4837b 100644
--- a/tests/test_ecdsa.py
+++ b/tests/test_ecdsa.py
@@ -11,7 +11,7 @@ import logging
from M2Crypto import EC, Rand
-from . import unittest
+from tests import unittest
from tests.test_ec_curves import tested_curve
log = logging.getLogger(__name__)
diff --git a/tests/test_engine.py b/tests/test_engine.py
index fd4ac2e..8c652ae 100644
--- a/tests/test_engine.py
+++ b/tests/test_engine.py
@@ -3,7 +3,7 @@
"""Unit tests for M2Crypto.Engine."""
from M2Crypto import Engine
-from . import unittest
+from tests import unittest
class EngineTestCase(unittest.TestCase):
diff --git a/tests/test_err.py b/tests/test_err.py
index 7ff0503..865ec00 100644
--- a/tests/test_err.py
+++ b/tests/test_err.py
@@ -7,7 +7,7 @@ Released under the terms of MIT/X11 License,
see the file LICENCE for more.
"""
from M2Crypto import Err
-from . import unittest
+from tests import unittest
class ErrTestCase(unittest.TestCase):
diff --git a/tests/test_evp.py b/tests/test_evp.py
index de2bd8a..d63b8b5 100644
--- a/tests/test_evp.py
+++ b/tests/test_evp.py
@@ -17,7 +17,7 @@ from binascii import a2b_hex, hexlify, unhexlify
from parameterized import parameterized
from M2Crypto import BIO, EVP, RSA, Rand, m2, util
-from . import unittest
+from tests import unittest
from tests.fips import fips_mode
log = logging.getLogger('test_EVP')
diff --git a/tests/test_obj.py b/tests/test_obj.py
index 5f3fe92..825c203 100644
--- a/tests/test_obj.py
+++ b/tests/test_obj.py
@@ -3,7 +3,7 @@
"""Unit tests for M2Crypto.m2 obj_* functions.
"""
from M2Crypto import ASN1, BIO, Rand, X509, m2, six
-from . import unittest
+from tests import unittest
"""
These functions must be cleaned up and moved to some python module
diff --git a/tests/test_rand.py b/tests/test_rand.py
index 765b1c8..1bf7a9c 100644
--- a/tests/test_rand.py
+++ b/tests/test_rand.py
@@ -11,7 +11,7 @@ import ctypes
import warnings
from M2Crypto import Rand, m2
-from . import unittest
+from tests import unittest
class RandTestCase(unittest.TestCase):
diff --git a/tests/test_rc4.py b/tests/test_rc4.py
index 6ef5266..4767f74 100644
--- a/tests/test_rc4.py
+++ b/tests/test_rc4.py
@@ -8,7 +8,7 @@ Copyright (c) 2009 Heikki Toivonen. All rights reserved."""
from M2Crypto import RC4, Rand
from binascii import hexlify
-from . import unittest
+from tests import unittest
from tests.fips import fips_mode
diff --git a/tests/test_rsa.py b/tests/test_rsa.py
index 21f7577..3de5016 100644
--- a/tests/test_rsa.py
+++ b/tests/test_rsa.py
@@ -10,7 +10,7 @@ import logging
import os
from M2Crypto import BIO, RSA, Rand, X509, m2, six
-from . import unittest
+from tests import unittest
from tests.fips import fips_mode
log = logging.getLogger('test_RSA')
diff --git a/tests/test_smime.py b/tests/test_smime.py
index e880bef..6014315 100644
--- a/tests/test_smime.py
+++ b/tests/test_smime.py
@@ -8,7 +8,7 @@ Copyright (C) 2006 Open Source Applications Foundation. All Rights Reserved.
import os.path
from M2Crypto import BIO, EVP, Rand, SMIME, X509
-from . import unittest
+from tests import unittest
# Various callbacks to set by X509_Store.set_verify_cb() for
diff --git a/tests/test_ssl.py b/tests/test_ssl.py
index 7a3271a..e18adf5 100644
--- a/tests/test_ssl.py
+++ b/tests/test_ssl.py
@@ -34,7 +34,7 @@ import warnings
from M2Crypto import (Err, Rand, SSL, X509, ftpslib, httpslib, m2, m2urllib,
m2urllib2, m2xmlrpclib, six)
from M2Crypto.SSL.timeout import DEFAULT_TIMEOUT
-from . import unittest
+from tests import unittest
from tests.fips import fips_mode
log = logging.getLogger('test_SSL')
diff --git a/tests/test_ssl_offline.py b/tests/test_ssl_offline.py
index 3ae99bf..fb1ab75 100644
--- a/tests/test_ssl_offline.py
+++ b/tests/test_ssl_offline.py
@@ -10,7 +10,7 @@ Copyright (C) 2009-2010 Heikki Toivonen. All Rights Reserved.
import doctest
from M2Crypto import Rand, SSL, X509
-from . import unittest
+from tests import unittest
from tests.test_ssl import srv_host
diff --git a/tests/test_threading.py b/tests/test_threading.py
index ce646e2..a0f96b4 100644
--- a/tests/test_threading.py
+++ b/tests/test_threading.py
@@ -5,7 +5,7 @@
Copyright (C) 2007 Open Source Applications Foundation. All Rights Reserved.
"""
from M2Crypto import threading as m2threading, Rand
-from . import unittest
+from tests import unittest
class ThreadingTestCase(unittest.TestCase):
diff --git a/tests/test_timeout.py b/tests/test_timeout.py
index 5d4564e..90080fc 100644
--- a/tests/test_timeout.py
+++ b/tests/test_timeout.py
@@ -5,7 +5,7 @@
import sys
from M2Crypto.SSL import timeout, struct_to_timeout, struct_size
-from . import unittest
+from tests import unittest
# Max value for sec argument on Windows:
# - needs to fit DWORD (signed 32-bit) when converted to millisec
diff --git a/tests/test_util.py b/tests/test_util.py
index 442630d..64c2683 100644
--- a/tests/test_util.py
+++ b/tests/test_util.py
@@ -7,7 +7,7 @@ All Rights Reserved.
"""
from M2Crypto import six
-from . import unittest
+from tests import unittest
class UtilTestCase(unittest.TestCase):
diff --git a/tests/test_x509.py b/tests/test_x509.py
index 0b126f7..c36757e 100644
--- a/tests/test_x509.py
+++ b/tests/test_x509.py
@@ -16,7 +16,7 @@ import time
import warnings
from M2Crypto import ASN1, BIO, EVP, RSA, Rand, X509, m2, six # noqa
-from . import unittest
+from tests import unittest
log = logging.getLogger(__name__)