fix coordination unit tests

One of the coordination unit tests fails because of a mock that's
being applied twice. This affects Python 3.10 in particular.

We're addressing the issue by disabling "MOCK_TOOZ" for that
specific test.

Change-Id: If02f7ad022679d74cb88f558b85ee7d22f253c77
(cherry picked from commit e7de7eef9d)
This commit is contained in:
Lucian Petrut 2022-09-19 11:30:50 +03:00
parent 0c899e914a
commit 9ea6aaa968
1 changed files with 3 additions and 1 deletions

View File

@ -98,8 +98,10 @@ class CoordinatorTestCase(test_base.HyperVBaseTestCase):
self.assertFalse(agent.started)
@mock.patch.object(coordination.COORDINATOR, 'get_lock')
class CoordinationTestCase(test_base.HyperVBaseTestCase):
MOCK_TOOZ = False
@mock.patch.object(coordination.COORDINATOR, 'get_lock')
def test_synchronized(self, get_lock):
@coordination.synchronized('lock-{f_name}-{foo.val}-{bar[val]}')
def func(foo, bar):