aea.test_
tools.mocks
This module contains mocking utils testing purposes.
AnyStringWith Objects
class AnyStringWith(str)
Helper class to assert calls of mocked method with string arguments.
It will use string inclusion as equality comparator.
__
eq__
def __eq__(other: Any) -> bool
Check equality.
RegexComparator Objects
class RegexComparator(str)
Helper class to assert calls of mocked method with string arguments.
It will use regex matching as equality comparator.
__
eq__
def __eq__(other: Any) -> bool
Check equality.
ctx_
mock_
Popen
@contextmanager
def ctx_mock_Popen() -> Generator
Mock subprocess.Popen.
Act as context manager.
:yield: mock generator.