Blob Blame History Raw
From 80a6e26650302329fa9aff26efa389bd99e397c5 Mon Sep 17 00:00:00 2001
From: Sean McGinnis <sean.mcginnis@gmail.com>
Date: Sun, 12 Jan 2020 02:36:28 -0600
Subject: [PATCH] Drop use of unittest2

unittest2 was needed for Python version <= 2.6, so it has not been
needed for quite some time now. See unittest2 note on:

https://docs.python.org/2.7/library/unittest.html

This replaces unittest2 in favor of the standard unittest package.

Change-Id: Idd5df4c8068810bbbd2bd5058ca38df9f5416a62
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
---
 lower-constraints.txt                    | 1 -
 oslo_log/tests/unit/test_versionutils.py | 5 +++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lower-constraints.txt b/lower-constraints.txt
index 3644ce5..c7ca21f 100644
--- a/lower-constraints.txt
+++ b/lower-constraints.txt
@@ -65,6 +65,5 @@ systemd-python==234
 testrepository==0.0.20
 testtools==2.3.0
 traceback2==1.4.0
-unittest2==1.1.0
 urllib3==1.22
 wrapt==1.10.11
diff --git a/oslo_log/tests/unit/test_versionutils.py b/oslo_log/tests/unit/test_versionutils.py
index 3084914..23ee8d4 100644
--- a/oslo_log/tests/unit/test_versionutils.py
+++ b/oslo_log/tests/unit/test_versionutils.py
@@ -13,11 +13,12 @@
 #    License for the specific language governing permissions and limitations
 #    under the License.
 
+import unittest
+
 import mock
 from oslotest import base as test_base
 import six
 from testtools import matchers
-import unittest2
 
 from oslo_log import versionutils
 
@@ -247,7 +248,7 @@ class DeprecatedTestCase(test_base.BaseTestCase):
                                as_of='Juno',
                                remove_in='Kilo')
 
-    @unittest2.skipIf(
+    @unittest.skipIf(
         six.PY3,
         'Deprecated exception detection does not work for Python 3')
     @mock.patch('oslo_log.versionutils.report_deprecated_feature')
-- 
2.20.1