# osc_lib.test package

## Submodules

## osc_lib.test.base module

exception osc_lib.test.base.ParserException

  Bases: `Exception`

class osc_lib.test.base.TestCase(*args: object, **kwargs: object)

  Bases: `TestCase`

  assertIsSubset(expected: Iterable[Any], actual: Iterable[Any]) → None
  assertNotCalled(m: Mock, msg: str | None = None) → None

    Assert a function was not called

  maxDiff = None
  setUp() → None

    Hook method for setting up the test fixture before exercising it.

class osc_lib.test.base.TestCommand(*args: object, **kwargs: object)

  Bases: `TestCase`

  Test cliff command classes

  assertItemEqual(expected: Sequence[Any], actual: Sequence[Any]) → None

    Compare item considering formattable columns.

    This method compares an observed item to an expected item column by column. If a column is a formattable column, observed and expected columns are compared using human_readable() and machine_readable().

  assertListItemEqual(expected: Sequence[Any], actual: Sequence[Any]) → None

    Compare a list of items considering formattable columns.

    Each pair of observed and expected items are compared using assertItemEqual() method.

  check_parser(cmd: Command, args: list[str], verify_args: list[tuple[str, Any]]) → Namespace
  setUp() → None

    Hook method for setting up the test fixture before exercising it.

## osc_lib.test.fakes module

class osc_lib.test.fakes.FakeApp(_stdout: IOWriterProtocol, _log: LoggerProtocol)

  Bases: `object`

  client_manager: FakeClientManager

class osc_lib.test.fakes.FakeClientManager

  Bases: `object`

  get_configuration() → dict[str, Any]

class osc_lib.test.fakes.FakeLog

  Bases: `object`

  critical(msg: str, *args: Any, **kwargs: Any) → None
  debug(msg: str, *args: Any, **kwargs: Any) → None
  error(msg: str, *args: Any, **kwargs: Any) → None
  info(msg: str, *args: Any, **kwargs: Any) → None
  messages: dict[str, str]
  warning(msg: str, *args: Any, **kwargs: Any) → None

class osc_lib.test.fakes.FakeModule(name: str, version: str)

  Bases: `object`

class osc_lib.test.fakes.FakeOptions(**kwargs: Any)

  Bases: `object`

class osc_lib.test.fakes.FakeResource(manager: Any = None, info: dict[str, Any] | None = None, loaded: bool = False, methods: dict[str, Any] | None = None)

  Bases: `object`

  get(item: str, default: Any = None) → Any
  property info: dict[str, Any]
  keys() → Iterable[str]
  pop(key: str, default_value: Any = None) → Any
  to_dict() → dict[str, Any]

class osc_lib.test.fakes.FakeResponse(headers: Mapping[str, str] | None = None, status_code: int = 200, data: object | None = None, encoding: type[str] | type[bytes] | None = None)

  Bases: `Response`

class osc_lib.test.fakes.FakeStdout

  Bases: `object`

  content: list[str]
  make_string() → str
  write(text: str) → None

class osc_lib.test.fakes.IOWriterProtocol(*args, **kwargs)

  Bases: `Protocol`

  write(text: str) → None

class osc_lib.test.fakes.LoggerProtocol(*args, **kwargs)

  Bases: `Protocol`

  critical(msg: str, *args: Any, **kwargs: Any) → None
  debug(msg: str, *args: Any, **kwargs: Any) → None
  error(msg: str, *args: Any, **kwargs: Any) → None
  info(msg: str, *args: Any, **kwargs: Any) → None
  warning(msg: str, *args: Any, **kwargs: Any) → None

## osc_lib.test.utils module

class osc_lib.test.utils.CompareBySet(iterable=(), /)

  Bases: `list`[`Any`]

  Class to compare value using set.

## Module contents

this page last updated: 2026-07-15 07:28:33

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

found an error? report a bug