Actually run the RemoteFSClient unit tests

A __init__.py file was missing. Also fix a unit test which failed
with 'TypeError: _patch_object() takes at least 2 arguments (1 given)'

Change-Id: I92e36ca1978d497f42573b61b6b1b03bbbd35f23
This commit is contained in:
Jordan Pittier 2016-02-26 15:02:23 +01:00
parent f9b4e55db5
commit 1b6eb839ee
2 changed files with 4 additions and 6 deletions

View File

View File

@ -193,10 +193,8 @@ class RemoteFsClientTestCase(base.TestCase):
# starts with "smbfs_"
self.assertEqual('/fake', client._mount_base)
def test_init_nfs_calls_check_nfs_options(self):
to_patch = remotefs.RemoteFsClient._check_nfs_options
with mock.patch.object(to_patch) as mock_check_nfs_options:
remotefs.RemoteFsClient("nfs", root_helper='true',
nfs_mount_point_base='/fake')
@mock.patch('os_brick.remotefs.remotefs.RemoteFsClient._check_nfs_options')
def test_init_nfs_calls_check_nfs_options(self, mock_check_nfs_options):
remotefs.RemoteFsClient("nfs", root_helper='true',
nfs_mount_point_base='/fake')
mock_check_nfs_options.assert_called_once_with()