|
1 | 1 | from __future__ import annotations |
2 | 2 |
|
3 | 3 | import datetime |
| 4 | +import sys |
4 | 5 | from http import HTTPStatus |
5 | 6 | from io import BytesIO |
6 | 7 | from pathlib import Path |
@@ -661,11 +662,29 @@ def test_api_filter_error( |
661 | 662 | assert_api_error(response, status=HTTPStatus.BAD_REQUEST) |
662 | 663 |
|
663 | 664 |
|
| 665 | +@pytest.mark.skipif(sys.platform == "win32", reason="does not run on windows") |
664 | 666 | @pytest.mark.parametrize( |
665 | 667 | ("name", "url"), |
666 | 668 | [ |
667 | | - ("commodities", "/long-example/api/commodities"), |
668 | 669 | ("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"), |
669 | 688 | ("events", "/long-example/api/events"), |
670 | 689 | ("income_statement", "/long-example/api/income_statement?time=2014"), |
671 | 690 | ("trial_balance", "/long-example/api/trial_balance?time=2014"), |
|
0 commit comments