The ironicclient.openstack.common.apiclient.fake_client Module

A fake server that “responds” to API methods with pre-canned responses.

All of these responses come from the spec, so if for some reason the spec’s wrong the tests might raise AssertionError. I’ve indicated in comments the places where actual behavior differs from the spec.

class ironicclient.openstack.common.apiclient.fake_client.FakeHTTPClient(*args, **kwargs)[source]

Bases: ironicclient.openstack.common.apiclient.client.HTTPClient

assert_called(method, url, body=None, pos=-1)[source]

Assert than an API method was just called.

assert_called_anytime(method, url, body=None)[source]

Assert than an API method was called anytime in the test.

authenticate()[source]
clear_callstack()[source]
client_request(client, method, url, **kwargs)[source]
class ironicclient.openstack.common.apiclient.fake_client.TestResponse(data)[source]

Bases: requests.models.Response

Wrap requests.Response and provide a convenient initialization.

ironicclient.openstack.common.apiclient.fake_client.assert_has_keys(dct, required=None, optional=None)[source]

Previous topic

The ironicclient.openstack.common.apiclient.exceptions Module

Next topic

The ironicclient.openstack.common.apiclient.utils Module

This Page