poprox_recommender.testing#
Support code for testing the poprox-recommender components and service.
This lives in the main package so it can be easily imported from any of the tests, regardless of their subdirectories.
Functions
|
|
|
|
|
|
|
|
|
|
|
Classes
|
Test service that directly runs the request handler in-process. |
Test service that directly runs the request handler in-process. |
|
|
Class to generate recommendation request using click history, onboarding topics, and candidate articles from MIND |
|
Interface for test services bridges that accept requests and return responses. |
- class poprox_recommender.testing.TestService(*args, **kwargs)#
Bases:
Protocol
Interface for test services bridges that accept requests and return responses. It abstracts direct local runs, Docker, and AWS Lambda test endpoints.
- request(req, pipeline)#
Request recommendations from the recommender.
- Parameters:
req (RecommendationRequestV2 | str)
pipeline (str)
- Return type:
- class poprox_recommender.testing.InProcessTestService#
Bases:
object
Test service that directly runs the request handler in-process.