Blob Blame History Raw
From 82098f63bc51971ce87cb240a6ef0f146d3de3ed Mon Sep 17 00:00:00 2001
From: Sean McGinnis <sean.mcginnis@gmail.com>
Date: Sun, 12 Jan 2020 02:38:39 -0600
Subject: [PATCH] Drop unittest2 usage

unittest2 was needed for Python versions <= 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 drops unittest2 in favor of the standard unittest package.

Change-Id: I40882f14ff2ac121764b432fc745b21ae751e321
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
---
 lower-constraints.txt                           | 1 -
 oslo_db/tests/sqlalchemy/test_async_eventlet.py | 6 +++---
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/lower-constraints.txt b/lower-constraints.txt
index e16d0be..7c25647 100644
--- a/lower-constraints.txt
+++ b/lower-constraints.txt
@@ -66,6 +66,5 @@ testresources==2.0.0
 testscenarios==0.4
 testtools==2.2.0
 traceback2==1.4.0
-unittest2==1.1.0
 wrapt==1.7.0
 xattr==0.9.2
diff --git a/oslo_db/tests/sqlalchemy/test_async_eventlet.py b/oslo_db/tests/sqlalchemy/test_async_eventlet.py
index 747601b..9e1600a 100644
--- a/oslo_db/tests/sqlalchemy/test_async_eventlet.py
+++ b/oslo_db/tests/sqlalchemy/test_async_eventlet.py
@@ -16,7 +16,7 @@
 """Unit tests for SQLAlchemy and eventlet interaction."""
 
 import logging
-import unittest2
+import unittest
 
 from oslo_utils import importutils
 import sqlalchemy as sa
@@ -46,8 +46,8 @@ class EventletTestMixin(object):
         TmpTable.__table__.create(self.engine)
         self.addCleanup(lambda: TmpTable.__table__.drop(self.engine))
 
-    @unittest2.skipIf(not tests.should_run_eventlet_tests(),
-                      'eventlet tests disabled unless TEST_EVENTLET=1')
+    @unittest.skipIf(not tests.should_run_eventlet_tests(),
+                     'eventlet tests disabled unless TEST_EVENTLET=1')
     def test_concurrent_transaction(self):
         # Cause sqlalchemy to log executed SQL statements.  Useful to
         # determine exactly what and when was sent to DB.
-- 
2.25.2