diff options
| author | Michael Vogt <egon@debian-devbox> | 2012-10-12 10:08:21 +0200 |
|---|---|---|
| committer | Michael Vogt <egon@debian-devbox> | 2012-10-12 10:08:21 +0200 |
| commit | 90b4a93152ef1efa4ecdf4028bbd992e8a9ac667 (patch) | |
| tree | 4f4a091b189e163b52c6f0b97569c637819a2623 /tests/test_auth.py | |
| parent | ada635b123bf1a1ebec2b3208742ab7fdaae43d6 (diff) | |
| download | python-apt-90b4a93152ef1efa4ecdf4028bbd992e8a9ac667.tar.gz | |
fix tests on python2.6 by using the python-unittest2 backport for "with self.assertRaises()"
Diffstat (limited to 'tests/test_auth.py')
| -rw-r--r-- | tests/test_auth.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/test_auth.py b/tests/test_auth.py index d742a471..2b524d28 100644 --- a/tests/test_auth.py +++ b/tests/test_auth.py @@ -14,6 +14,13 @@ else: from BaseHTTPServer import HTTPServer from SimpleHTTPServer import SimpleHTTPRequestHandler as HTTPRequestHandler + +if sys.version_info[0] == 2 and sys.version_info[1] == 6: + from unittest2 import TestCase +else: + from unittest import TestCase + + import apt_pkg import apt.auth @@ -103,7 +110,7 @@ DHcut3Yey8o= -----END PGP PUBLIC KEY BLOCK-----""" -class TestAuthKeys(unittest.TestCase): +class TestAuthKeys(TestCase): """Test handling of keys for signed repositories.""" |
