Skip to content
This repository was archived by the owner on Apr 2, 2025. It is now read-only.

Commit 33a9d38

Browse files
test: add fail case to make_request match/case
1 parent 3ef8146 commit 33a9d38

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/conftest.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from fastapi import FastAPI, status
77
from fastapi.testclient import TestClient
88
from httpx import Response
9+
from pytest import fail
910

1011
from stapi_fastapi.models.product import (
1112
Product,
@@ -217,5 +218,7 @@ def make_request(
217218
res = stapi_client.get(endpoint, params=params)
218219
case "POST":
219220
res = stapi_client.post(endpoint, json=body)
221+
case _:
222+
fail(f"method {method} not supported in make request")
220223

221224
return res

0 commit comments

Comments
 (0)