Improve unit test coverage for dcmanager's APIs (subcloud_backup)

Improves unit test coverage for dcmanager's subcloud_backup
API from 81% to 98%.

Test plan:
  All of the tests were created taking into account the
output of 'tox -c tox.ini -e cover' command

Story: 2007082
Task: 49581

Change-Id: I7cb6b661dd75a9d92f31113ff7ba5a887e489abc
Signed-off-by: rlima <Raphael.Lima@windriver.com>
This commit is contained in:
rlima 2023-12-27 15:00:36 -03:00 committed by Raphael Lima
parent 5307a60a85
commit c61f21b28c
2 changed files with 1023 additions and 1460 deletions

View File

@ -263,7 +263,7 @@ class DCManagerTestCase(base.BaseTestCase):
self.addCleanup(mock_patch_object.stop)
def _mock_os_listdir(self):
"""Mock os.listdir"""
"""Mock os' listdir"""
mock_patch_object = mock.patch.object(os, 'listdir')
self.mock_os_listdir = mock_patch_object.start()