This commit is contained in:
@@ -8,6 +8,9 @@ from sqlmodel import Session, SQLModel, create_engine
|
||||
|
||||
from inse import config
|
||||
from inse.auth.model import AccessToken, Organization, UserRole
|
||||
from inse.authors.institution_membership_query import (
|
||||
build_active_institution_membership_query,
|
||||
)
|
||||
from inse.dashboard.service import (
|
||||
get_dashboard_bmbf_project_statuses,
|
||||
get_dashboard_organization,
|
||||
@@ -232,11 +235,9 @@ async def test_dashboard_statistics_counts_organization_data_and_all_projects():
|
||||
assert works_call.kwargs["query"]["nested"]["query"]["term"] == {
|
||||
"authorships.institutions.id": ORG_INSTITUTION_ID
|
||||
}
|
||||
assert authors_call.kwargs["query"]["bool"]["should"][0]["bool"]["filter"][
|
||||
0
|
||||
]["nested"]["query"]["match_phrase"] == {
|
||||
"last_known_institutions.id": ORG_INSTITUTION_ID
|
||||
}
|
||||
assert authors_call.kwargs["query"] == build_active_institution_membership_query(
|
||||
ORG_INSTITUTION_ID
|
||||
)
|
||||
assert all(
|
||||
call.kwargs["cluster"] == ESCluster.INSE
|
||||
for call in [eu_call, bmbf_call, *dfg_calls]
|
||||
|
||||
Reference in New Issue
Block a user