THE ORIONIS API
Build with clarity.
Explore the building blocks of an async-first Python framework. Every module, class, and method — connected, searchable, and ready to build with.
class documentation
class TestCase(unittest.IsolatedAsyncioTestCase): (source)
Constructor: TestCase(method_name)
Undocumented
| Class Method | set |
Set the method pattern for identifying test methods. |
| Method | __init__ |
Initialize the test case and eagerly wrap the designated test method. |
| Method | _resolve |
Wrap a test method to initialize the application context before execution. |
| Method | _setup |
Configure the event loop's slow-callback threshold. |
| Async Method | mcp |
Create an MCP client using the test runner's application. |
Wrap a test method to initialize the application context before execution.
| Parameters | |
method:Callable[..., Any] | The test method to be wrapped. |
| Returns | |
Callable[..., Any] | An asynchronous wrapper that invokes the test method within the application context. |
Configure the event loop's slow-callback threshold.
Keep asyncio debug checks enabled while reporting substantial event-loop blocking.
| Returns | |
None | Set the loop's slow_callback_duration to the configured threshold. |
async def mcp(self, server:
type[ Server] | CompiledMcpServer, config: McpConfig | None = None, *, app: IContainer | None = None) -> McpTestClient:
(source)
¶
Create an MCP client using the test runner's application.
| Parameters | |
server:type[Server] | CompiledMcpServer | Server declaration or compiled snapshot to exercise. |
config:McpConfig | None, optional | Client limits; use MCP defaults when omitted. |
app:IContainer | None, optional | Explicit container for isolated tests; otherwise use the application already booted by the Orionis test runner. |
| Returns | |
McpTestClient | In-process client with independent request scopes and event state. |
| Raises | |
RuntimeError | If no container is supplied and the application is not booted. |