Merge "Fix unit tests broken by olso.utils"

This commit is contained in:
Zuul 2023-11-10 02:55:21 +00:00 committed by Gerrit Code Review
commit 338ee65c4c
2 changed files with 4 additions and 0 deletions

View File

@ -36,6 +36,8 @@
Takes advantage of the base tox job's install-siblings feature.
# The job only tests the latest and shouldn't be run on the stable branches
branches: ^master$
# TODO(tkajinam): Make this voting once oslo.utils is bumped to 6.3.0
voting: false
required-projects:
- name: github.com/sqlalchemy/sqlalchemy
override-checkout: main

View File

@ -1040,6 +1040,7 @@ class TestArgsSerializer(test.NoDBTestCase):
class TestRegistry(test.NoDBTestCase):
@mock.patch('nova.objects.base.objects')
def test_hook_chooses_newer_properly(self, mock_objects):
del mock_objects.MyObj
reg = base.NovaObjectRegistry()
reg.registration_hook(MyObj, 0)
@ -1056,6 +1057,7 @@ class TestRegistry(test.NoDBTestCase):
@mock.patch('nova.objects.base.objects')
def test_hook_keeps_newer_properly(self, mock_objects):
del mock_objects.MyObj
reg = base.NovaObjectRegistry()
reg.registration_hook(MyObj, 0)