Skip to content

Commit

Permalink
explicitly closed fastapi test client (#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
evalott100 authored Nov 25, 2024
1 parent 9d3d9bf commit cec9fda
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/backends/rest/test_rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ class TestRestServer:
@pytest.fixture(scope="class")
def client(self, assertable_controller):
app = RestBackend(assertable_controller)._server._app
return TestClient(app)
with TestClient(app) as client:
yield client

def test_read_int(self, assertable_controller, client):
expect = 0
Expand Down

0 comments on commit cec9fda

Please sign in to comment.