This repository has been archived by the owner on May 31, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
- Loading branch information
1 parent
9b0adc8
commit d8b0a3e
Showing
2 changed files
with
10 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,28 @@ | ||
from marda_extractors_api import extract | ||
from pathlib import Path | ||
|
||
import pytest | ||
from marda_extractors_api import extract | ||
|
||
|
||
@pytest.fixture(scope="session") | ||
def client(): | ||
from fastapi.testclient import TestClient | ||
|
||
from marda_registry.app import api | ||
|
||
yield TestClient(app=api) | ||
|
||
|
||
LFS_PATH = Path(__file__).parent.parent / "marda_registry" / "data" / "lfs" | ||
|
||
|
||
@pytest.mark.parametrize("ft_id", [d.name for d in LFS_PATH.glob("*")]) | ||
def test_files(ft_id, client): | ||
ft_files = (LFS_PATH / ft_id).glob("*") | ||
with client as cli: | ||
response = cli.get(f"/filetypes/{ft_id}") | ||
assert response.status_code == 200 | ||
response = response.json() | ||
assert response | ||
assert response | ||
supported_extractors = response.get("supported_extractors") | ||
assert supported_extractors is not None |