Skip to content

Commit

Permalink
test client is a lifespan aware context manager
Browse files Browse the repository at this point in the history
Signed-off-by: Rob Howley <howley.robert@gmail.com>
  • Loading branch information
robhowley committed Oct 24, 2024
1 parent 5c69273 commit 385e3ea
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import asyncio
import json
from typing import List

Expand Down Expand Up @@ -136,6 +135,5 @@ def python_fs_client(environment, universal_data_sources, request):
feast_objects.extend([driver(), customer(), location()])
fs.apply(feast_objects)
fs.materialize(environment.start_date, environment.end_date)
asyncio.get_event_loop().run_until_complete(fs.initialize())
client = TestClient(get_app(fs))
yield client
with TestClient(get_app(fs)) as client:
yield client

0 comments on commit 385e3ea

Please sign in to comment.