From 0acb1d49a78d6d63013ee9b7352e70cb8dd9b2c6 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Fri, 30 Jan 2015 02:06:33 +0100 Subject: [PATCH] Use samba TestCase so we get all compatibility functions on Python < 2.7. Change-Id: Iba87e3c8fa9331c4d5438ab60a8385379da634d7 Signed-Off-By: Jelmer Vernooij Reviewed-by: Andrew Bartlett --- python/samba/tests/__init__.py | 2 +- selftest/tests/test_samba.py | 2 +- selftest/tests/test_socket_wrapper.py | 2 +- selftest/tests/test_target.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/python/samba/tests/__init__.py b/python/samba/tests/__init__.py index 480b2c81352..b73308ecd49 100644 --- a/python/samba/tests/__init__.py +++ b/python/samba/tests/__init__.py @@ -81,7 +81,7 @@ class TestCase(unittest.TestCase): fn(*args, **kwargs) -class LdbTestCase(unittest.TestCase): +class LdbTestCase(TestCase): """Trivial test case for running tests against a LDB.""" def setUp(self): diff --git a/selftest/tests/test_samba.py b/selftest/tests/test_samba.py index 4528213c4e5..23de0d34c73 100644 --- a/selftest/tests/test_samba.py +++ b/selftest/tests/test_samba.py @@ -21,7 +21,7 @@ from cStringIO import StringIO -from unittest import TestCase +from samba.tests import TestCase from selftest.target.samba import ( bindir_path, diff --git a/selftest/tests/test_socket_wrapper.py b/selftest/tests/test_socket_wrapper.py index 5862f1edf8a..e278fdddfa6 100644 --- a/selftest/tests/test_socket_wrapper.py +++ b/selftest/tests/test_socket_wrapper.py @@ -19,7 +19,7 @@ """Tests for selftest/socket_wrapper.""" -from unittest import TestCase +from samba.tests import TestCase from selftest import socket_wrapper diff --git a/selftest/tests/test_target.py b/selftest/tests/test_target.py index 0d081ceadb0..ed9b064961e 100644 --- a/selftest/tests/test_target.py +++ b/selftest/tests/test_target.py @@ -29,7 +29,7 @@ from selftest.target import ( UnsupportedEnvironment, ) -from unittest import TestCase +from samba.tests import TestCase class DummyEnvironment(Environment):