From f8a063b73b0a2132946f020056f8e9cf9ab5b2c6 Mon Sep 17 00:00:00 2001 From: taxe10 Date: Wed, 5 Jun 2024 14:49:09 -0700 Subject: [PATCH] Add client to pytest --- src/test/conftest.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/test/conftest.py b/src/test/conftest.py index 338687e..9d582ca 100644 --- a/src/test/conftest.py +++ b/src/test/conftest.py @@ -1,6 +1,6 @@ import pytest from tiled.catalog import from_uri -from tiled.client import Context +from tiled.client import Context, from_context from tiled.server.app import build_app @@ -24,3 +24,9 @@ def app(catalog): def context(app): with Context.from_app(app) as context: yield context + + +@pytest.fixture +def client(context): + client = from_context(context) + yield client