Skip to content
This repository has been archived by the owner on May 31, 2024. It is now read-only.

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 23, 2024
1 parent 9b0adc8 commit d8b0a3e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
- name: Run database ingestion tasks
run: |
invoke validate-entries
test:

runs-on: ubuntu-latest
Expand All @@ -80,7 +80,7 @@ jobs:

- name: Run database ingestion tasks
run: |
pytest -vvv --durations=0
pytest -vvv --durations=0
build:
runs-on: ubuntu-latest
Expand Down
10 changes: 8 additions & 2 deletions tests/test_extractors.py
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

0 comments on commit d8b0a3e

Please sign in to comment.