The designateclient.tests.base Module

class designateclient.tests.base.APITestCase(*args, **kwds)[source]

Bases: designateclient.tests.base.TestCase

Test case base class for all unit tests.

TEST_URL = 'http://127.0.0.1:9001/'
VERSION = None
assertQueryStringContains(**kwargs)[source]

Verify the query string contains the expected parameters.

This method is used to verify that the query string for the most recent request made contains all the parameters provided as kwargs, and that the value of each parameter contains the value for the kwarg. If the value for the kwarg is an empty string (‘’), then all that’s verified is that the parameter is present.

assertQueryStringIs(qs='')[source]

Verify the QueryString matches what is expected.

The qs parameter should be of the format ‘foo=bar&abc=xyz’

assertRequestBodyIs(body=None, json=None)[source]
assertRequestHeaderEqual(name, val)[source]

Verify that the last request made contains a header and its value

The request must have already been made.

get_base(base_url=None)[source]
get_client(version=None, session=None)[source]
setUp()[source]

Run before each test method to initialize test environment.

stub_url(method, parts=None, base_url=None, json=None, **kwargs)[source]
class designateclient.tests.base.TestCase(*args, **kwds)[source]

Bases: oslotest.base.BaseTestCase

Test case base class for all unit tests.

setUp()[source]

Run before each test method to initialize test environment.