diff options
author | Matěj Cepl <mcepl@cepl.eu> | 2015-10-13 14:51:24 +0200 |
---|---|---|
committer | Matěj Cepl <mcepl@cepl.eu> | 2015-10-13 15:23:06 +0200 |
commit | a4e8e60f95ce6b2c1e4bc5d804d6521392bfa66b (patch) | |
tree | 5bb242ba3646b2df8322c2555975c4244ca4588e /tests/test_authcookie.py | |
parent | 1b5f8bbe04280558dfe577a2df203eaf0600c473 (diff) | |
download | m2crypto-a4e8e60f95ce6b2c1e4bc5d804d6521392bfa66b.tar.gz |
Switch unit testing to have at least 2.7 unittest API available.
Fixes #48
Diffstat (limited to 'tests/test_authcookie.py')
-rw-r--r-- | tests/test_authcookie.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/test_authcookie.py b/tests/test_authcookie.py index 9ce0eb8..458d731 100644 --- a/tests/test_authcookie.py +++ b/tests/test_authcookie.py @@ -4,7 +4,12 @@ Copyright (c) 1999-2002 Ng Pheng Siong. All rights reserved.""" -import Cookie, binascii, time, unittest, sys +import Cookie, binascii, time, sys +try: + import unittest2 as unittest +except ImportError: + import unittest + from M2Crypto.AuthCookie import AuthCookie, AuthCookieJar, mix, unmix, unmix3 from M2Crypto import Rand, EVP |