Add rsync get_fs_meta_struct not file test

The patch add rsync get_fs_meta_struct not file test

Change-Id: I94e9144a77acea1cc5f374071d96d4be0b9c8189
This commit is contained in:
gecong1973 2019-01-22 23:38:22 -08:00
parent 5dc9e94b0d
commit 71c8115098
1 changed files with 9 additions and 0 deletions

View File

@ -1816,3 +1816,12 @@ class TestRsyncEngine(unittest.TestCase):
files_meta,
old_fsmetastruct,
write_queue)
@patch('os.path.isfile')
def test_get_fs_meta_struct_isnot_file(self, mock_os_path_isfile):
fs_meta_path = '/home/tecs'
fs_meta_struct = {}
fake_rsync = self.mock_rsync
mock_os_path_isfile.return_value = False
ret = fake_rsync.get_fs_meta_struct(fs_meta_path=fs_meta_path)
self.assertEqual(ret, fs_meta_struct)