summaryrefslogtreecommitdiff
path: root/tests/test_timeout.py
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@cepl.eu>2020-12-02 19:36:15 +0100
committerMatěj Cepl <mcepl@cepl.eu>2020-12-02 19:53:09 +0100
commit2ed7a360dcba129c27d1232ea561b05d5391ae4b (patch)
treeb64f58d4174479bb71ed69a8b2d1b3ff1666802c /tests/test_timeout.py
parente64968e41383436c4be809b3c8706270734ca9d8 (diff)
downloadm2crypto-2ed7a360dcba129c27d1232ea561b05d5391ae4b.tar.gz
Mass removal of deprecated constructs.
* Replace unittest.makeSuite with unittest.TestLoader().loadTestsFromTestCase * import unittest from relative import
Diffstat (limited to 'tests/test_timeout.py')
-rw-r--r--tests/test_timeout.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_timeout.py b/tests/test_timeout.py
index 6d05449..5d4564e 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 tests import unittest
+from . import unittest
# Max value for sec argument on Windows:
# - needs to fit DWORD (signed 32-bit) when converted to millisec
@@ -127,7 +127,7 @@ class TimeoutTestCase(unittest.TestCase):
def suite():
suite = unittest.TestSuite()
- suite.addTest(unittest.makeSuite(TimeoutTestCase))
+ suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TimeoutTestCase))
return suite