'Test that we check path exists with default file.'

@mock.patch.object(cinder_rtstool, 'os', **{'path.exists.return_value': True, 'path.dirname.return_value': mock.sentinel.dirname})
@mock.patch.object(cinder_rtstool, 'rtslib_fb', **{'root.default_save_file': mock.sentinel.filename})
def test_save(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)
    self.assertEqual(0, mock_os.makedirs.call_count)
