mex.backend.testing package

Submodules

mex.backend.testing.ldap module

mex.backend.testing.ldap.get_merged_person_from_login(username: Annotated[str, Depends(has_write_access_ldap_mocked)]) MergedPerson

Return a mocked merged person from the login LDAP information.

mex.backend.testing.ldap.search_persons_or_contact_points_in_ldap(q: Annotated[str, Query(PydanticUndefined)] = 'mex@rki.de', limit: Annotated[int, Query(PydanticUndefined)] = 10, _: Annotated[str | None, Depends(has_write_access_ldap_mocked)] = None) PaginatedItemsContainer[ExtractedPerson | ExtractedContactPoint]

Search for person or contact points in LDAP and return mocked data for testing.

Parameters:
  • q – The name of the person or contact point

  • limit – The maximum number of results to return

Returns:

Paginated list of ExtractedPersons and ExtractedContactPoints

mex.backend.testing.main module

mex.backend.testing.security module

mex.backend.testing.security.has_write_access_ldap_mocked(credentials: Annotated[HTTPBasicCredentials, Depends(HTTPBasic)]) str

Mocked function to verify if provided credentials have LDAP write access.

Parameters:

credentials – username and password

mex.backend.testing.system module

mex.backend.testing.system.flush_graph_database() Status

Flush the database.

Module contents