oslo_privsep.tests package

oslo_privsep.tests package

Submodules

oslo_privsep.tests.fixture module

class oslo_privsep.tests.fixture.UnprivilegedPrivsepFixture(context)

Bases: fixtures.fixture.Fixture

setUp()

oslo_privsep.tests.test_capabilities module

class oslo_privsep.tests.test_capabilities.TestCapabilities(*args, **kwds)

Bases: oslotest.base.BaseTestCase

test_drop_all_caps_except(mock_capset)
test_drop_all_caps_except_error(mock_capset)
test_get_caps(mock_capget)
test_get_caps_error(mock_capget)
test_set_keepcaps(mock_prctl)
test_set_keepcaps_error(mock_prctl)

oslo_privsep.tests.test_comm module

class oslo_privsep.tests.test_comm.BufSock

Bases: object

recv(bufsize)
sendall(data)
shutdown(_flag)
class oslo_privsep.tests.test_comm.TestSerialization(*args, **kwds)

Bases: oslotest.base.BaseTestCase

assertSendable(value)
send(data)
setUp()
test_badobj()
test_bool()
test_bytes()
test_dict()
test_eof()
test_int()
test_list()
test_none()
test_tuple()
test_unicode()

oslo_privsep.tests.test_daemon module

class oslo_privsep.tests.test_daemon.ClientChannelTestCase(*args, **kwds)

Bases: oslotest.base.BaseTestCase

DICT = {'string_1': ('tuple_1', b'tuple_2'), b'byte_1': ['list_1', 'list_2']}
EXPECTED = {'byte_1': ['list_1', 'list_2'], 'string_1': ('tuple_1', b'tuple_2')}
setUp()
test_out_of_band_log_message()
test_out_of_band_not_log_message()
class oslo_privsep.tests.test_daemon.DaemonTest(*args, **kwds)

Bases: oslotest.base.BaseTestCase

test_drop_privs(mock_dropcaps, mock_keepcaps, mock_setgroups, mock_setgid, mock_setuid)
class oslo_privsep.tests.test_daemon.LogRecorder(logs, *args, **kwargs)

Bases: logging.Formatter

format(record)
class oslo_privsep.tests.test_daemon.LogTest(*args, **kwds)

Bases: oslo_privsep.tests.testctx.TestContextTestCase

setUp()
test_format_record()
test_priv_loglevel()
test_record_data()
exception oslo_privsep.tests.test_daemon.TestException

Bases: Exception

class oslo_privsep.tests.test_daemon.WithContextTest(*args, **kwds)

Bases: oslo_privsep.tests.testctx.TestContextTestCase

test_unexported()
oslo_privsep.tests.test_daemon.undecorated()

oslo_privsep.tests.test_priv_context module

exception oslo_privsep.tests.test_priv_context.CustomError(code, msg)

Bases: Exception

class oslo_privsep.tests.test_priv_context.PrivContextTest(*args, **kwds)

Bases: oslo_privsep.tests.testctx.TestContextTestCase

test_helper_command()
test_helper_command_default()
test_helper_command_default_dirtoo()
test_init_known_contexts()
test_init_windows(mock_sys)
test_set_client_mode(mock_sys)
class oslo_privsep.tests.test_priv_context.RootwrapTest(*args, **kwds)

Bases: oslo_privsep.tests.testctx.TestContextTestCase

setUp()
test_getpid()
class oslo_privsep.tests.test_priv_context.SeparationTest(*args, **kwds)

Bases: oslo_privsep.tests.testctx.TestContextTestCase

test_client_mode()
test_getpid()
class oslo_privsep.tests.test_priv_context.SerializationTest(*args, **kwds)

Bases: oslo_privsep.tests.testctx.TestContextTestCase

test_basic_functionality()
test_raises_custom()
test_raises_standard()

oslo_privsep.tests.testctx module

class oslo_privsep.tests.testctx.TestContextTestCase(*args, **kwds)

Bases: oslotest.base.BaseTestCase

assertNotMyPid(pid)
setUp()

Module contents

Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.