'Test the setting of the NAS Security Option
In this test case, the marker file does not exist. There are also
pre-existing Cinder volumes.'

@mock.patch('os.path.join')
@mock.patch('os.path.isfile')
def test_determine_nas_security_options_when_auto_and_old_install(self, isfile, join):

    drv = self._driver
    drv._mounted_shares = [self.TEST_EXPORT]
    file_path = ('%s/.cinderSecureEnvIndicator' % self.TEST_MNT_POINT)
    is_new_install = False
    drv._ensure_shares_mounted = mock.Mock()
    nas_mount = drv._get_mount_point_for_share = mock.Mock(return_value=self.TEST_MNT_POINT)
    join.return_value = file_path
    isfile.return_value = False
    secure_file_permissions = 'auto'
    nas_option = drv._determine_nas_security_option_setting(secure_file_permissions, nas_mount, is_new_install)
    self.assertEqual('false', nas_option)
    secure_file_operations = 'auto'
    nas_option = drv._determine_nas_security_option_setting(secure_file_operations, nas_mount, is_new_install)
    self.assertEqual('false', nas_option)
