Fix thread/threading change in unit test

This unit test was not updated when the thread/threading name
change happened. This fixes the unit test when eventlet is
installed.

Change-Id: I0e0da83187190c7145bb01f77daf22a43868115c
Closes-bug: #1875678
This commit is contained in:
Terry Wilson 2020-07-24 16:42:17 -05:00
parent f345c771a4
commit 48ee1008f5
1 changed files with 3 additions and 3 deletions

View File

@ -44,12 +44,12 @@ except ImportError:
class GreenThreadingFixture(fixtures.Fixture):
def _setUp(self):
if 'eventlet' in sys.modules:
self._orig = api.thread.get_ident
api.thread.get_ident = thread.get_ident
self._orig = api.threading.get_ident
api.threading.get_ident = thread.get_ident
self.addCleanup(self.cleanup)
def cleanup(self):
api.thread.get_ident = self._orig
api.threading.get_ident = self._orig
class FakeTransaction(object):