GitHub

Services

API reference for Services.

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

AttributeTypeDescription
context= context
runtime= runtime

Functions

__init__

__init__(context, runtime) -> None
ParameterTypeDescription
contextContext
runtimeRuntime
def __init__(self, context: Context, runtime: Runtime) -> None:
    self.context = context
    self.runtime = runtime