The services a layer_fixture built, and the runtime they live on.
Take it as the first parameter of an @effect test, annotated with
what the layer builds; the test may then use those services::
db = layer_fixture(DatabaseLive)
@effect
def test_query(db: Services[Database]):
conn = yield from Database()Attributes#
| Attribute | Type | Description |
|---|---|---|
context | = context | |
runtime | = runtime |
Functions#
__init__#
__init__(context, runtime) -> None| Parameter | Type | Description |
|---|---|---|
context | Context | |
runtime | Runtime |
def __init__(self, context: Context, runtime: Runtime) -> None:
self.context = context
self.runtime = runtime