The ironic_python_agent.tests.functional.base Module

class ironic_python_agent.tests.functional.base.FunctionalBase(*args, **kwds)[source]

Bases: oslotest.base.BaseTestCase

request(method, path, expect_error=None, expect_json=True, **kwargs)[source]

Send a request to the agent and verifies response.

Param:method type of request to send as a string
Param:path desired API endpoint to request, for example ‘commands’
Param:expect_error error code to expect, if an error is expected
Param:expect_json whether to expect a JSON response. if True, convert it to a dict before returning, otherwise return the Response object
Parameters:**kwargs

keyword args to pass to the request method

Raises:HTTPError if an error is returned that was not expected
Raises:AssertionError if a received HTTP status code does not match expect_error
Returns:the response object
setUp()[source]

Start the agent and wait for it to start

Previous topic

The ironic_python_agent.netutils Module

Next topic

The ironic_python_agent.tests.functional.test_commands Module

Project Source

This Page