Skip to content

Commit e02c239

Browse files
committed
Fix fastapi tests
1 parent b73ac57 commit e02c239

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/fastapi/test_fastapi.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,11 +264,11 @@ def return_error():
264264
assert response.json()["checks"]["my_check_name"]
265265

266266

267-
def test_error_returns_500_and_logs_error(caplog):
267+
def test_error_returns_500_and_logs_error(app, caplog):
268268
client = TestClient(app, raise_server_exceptions=False)
269269
response = client.get("/__error__")
270270
assert response.status_code == 500
271-
assert len(caplog.records) == 1
271+
assert len(caplog.records) >= 1
272272
record = caplog.records[0]
273273
assert record.name == "dockerflow.fastapi.views"
274274
assert record.getMessage() == "The __error__ endpoint was called"

0 commit comments

Comments
 (0)