Skip to content

Commit cd90cdd

Browse files
committed
fixup! misc: test robustness
1 parent 64d619e commit cd90cdd

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

tests/test_json_api.py

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from __future__ import annotations
22

33
import datetime
4+
import sys
45
from http import HTTPStatus
56
from io import BytesIO
67
from pathlib import Path
@@ -661,11 +662,29 @@ def test_api_filter_error(
661662
assert_api_error(response, status=HTTPStatus.BAD_REQUEST)
662663

663664

665+
@pytest.mark.skipif(sys.platform == "win32", reason="does not run on windows")
664666
@pytest.mark.parametrize(
665667
("name", "url"),
666668
[
667-
("commodities", "/long-example/api/commodities"),
668669
("documents", "/example/api/documents"),
670+
],
671+
)
672+
def test_api_unix_only(
673+
test_client: FlaskClient,
674+
snapshot: SnapshotFunc,
675+
name: str,
676+
url: str,
677+
) -> None:
678+
response = test_client.get(url)
679+
data = assert_api_success(response)
680+
assert data
681+
snapshot(data, name=name, json=True)
682+
683+
684+
@pytest.mark.parametrize(
685+
("name", "url"),
686+
[
687+
("commodities", "/long-example/api/commodities"),
669688
("events", "/long-example/api/events"),
670689
("income_statement", "/long-example/api/income_statement?time=2014"),
671690
("trial_balance", "/long-example/api/trial_balance?time=2014"),

0 commit comments

Comments
 (0)