Skip to content

Commit

Permalink
Fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
annaCPR committed Dec 3, 2024
1 parent 0950014 commit 9f81d68
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def app_token_factory(monkeypatch):
def mock_return(_, __, ___):
return True

def _app_token(allowed_corpora_ids):
def _app_token(allowed_corpora_ids: list[str]):
subject = "CCLW"
audience = "localhost"
input_str = f"{allowed_corpora_ids};{subject};{audience}"
Expand Down
4 changes: 2 additions & 2 deletions tests/non_search/routers/lookups/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,8 @@ def test_config_endpoint_cclw_stats(data_client, data_db, valid_token):
@pytest.mark.parametrize(
"allowed_corpora_ids, expected_organisation, other_organisation",
[
("UNFCCC.corpus.i00000001.n0000", "UNFCCC", "CCLW"),
("CCLW.corpus.i00000001.n0000", "CCLW", "UNFCCC"),
(["UNFCCC.corpus.i00000001.n0000"], "UNFCCC", "CCLW"),
(["CCLW.corpus.i00000001.n0000"], "CCLW", "UNFCCC"),
],
)
def test_config_endpoint_returns_stats_for_allowed_corpora_only(
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/app/core/test_organisation.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

def test_expected_organisations_present(data_db: Session):
orgs = get_organisations(
data_db, ["UNFCCC.corpus.i00000001.n0000,CCLW.corpus.i00000001.n0000"]
data_db, ["UNFCCC.corpus.i00000001.n0000", "CCLW.corpus.i00000001.n0000"]
)
assert len(orgs) == EXPECTED_NUM_ORGS

Expand Down

0 comments on commit 9f81d68

Please sign in to comment.