'Test that we create path if it doesn\'t exist with default file.'

@mock.patch.object(cinder_rtstool, 'os', **{'path.exists.return_value': False, 'path.dirname.return_value': mock.sentinel.dirname})
@mock.patch.object(cinder_rtstool, 'rtslib_fb', **{'root.default_save_file': mock.sentinel.filename})
def test_save_no_targetcli(self, mock_rtslib, mock_os):

    cinder_rtstool.save_to_file(None)
    rtsroot = mock_rtslib.root.RTSRoot
    rtsroot.assert_called_once_with()
    rtsroot.return_value.save_to_file.assert_called_once_with(mock.sentinel.filename)
    mock_os.path.dirname.assert_called_once_with(mock.sentinel.filename)
    mock_os.path.exists.assert_called_once_with(mock.sentinel.dirname)
    mock_os.makedirs.assert_called_once_with(mock.sentinel.dirname, 493)
