'Test availability of resource when the service is deployed.
When the service is deployed, resource is considered as available.'

@mock.patch.object(clients.OpenStackClients, 'client_plugin')
def test_service_deployed(self, mock_client_plugin_method):

    (mock_service_types, mock_client_plugin) = self._mock_client_plugin(['test_type'])
    mock_client_plugin_method.return_value = mock_client_plugin
    self.assertTrue(generic_rsrc.ResourceWithDefaultClientName.is_service_available(context=mock.Mock())[0])
    mock_client_plugin_method.assert_called_once_with(generic_rsrc.ResourceWithDefaultClientName.default_client_name)
    mock_service_types.assert_called_once_with()
    mock_client_plugin.does_endpoint_exist.assert_called_once_with(service_type='test_type', service_name=generic_rsrc.ResourceWithDefaultClientName.default_client_name)
