Closed andersonnyc closed 1 year ago
Finalized label, estimate, and sprint assignment as discussed during meeting
Test Flask CLI Commands
- It should call the db-create command
Test Cases for Recommendation Model
- It should Create a Recommendation and add it to the database
- It should Create a Recommendation and assert that it exists
- It should Delete a Recommendation
- It should deserialize a Recommendation
- It should not deserialize a bad bought_in_last30d attribute
- It should not deserialize bad data
- It should not deserialize a bad recommendation_type attribute
- It should not deserialize a bad viewed_in_last7d attribute
- It should not deserialize a Recommendation with missing data
- It should Find Recommendations after last_relevance_date
- It should Find Recommendations by bought_in_last30d
- It should Find Recommendations by last_relevance_date
- It should Find Recommendations by Product ID
- It should Find Recommendations by recommendation_type
- It should Find Recommendations by User ID
- It should Find a Recommendation by User Segment
- It should Find Recommendations by viewed_in_last7d
- It should Find a Recommendation by ID
- It should Find a Recommendation by ID or return 404_NOT_FOUND if not found
- It should return 404_NOT_FOUND for ID not found
- It should List all Recommendations in the database
- It should Read a Recommendation
- It should serialize a Recommendation
- It should Update a Recommendation
- It should Not Update a Recommendation with no ID
Recommendation Server Tests
- It should not Create a recommendation with no content type
- It should not Create a recommendation with the wrong content type
- It should Get a single recommendation
- It should not Get a recommendation thats not found
- It should be healthy
- It should call the Home Page
Name Stmts Miss Cover Missing
----------------------------------------------------------------
service/__init__.py 18 3 83% 31-34
service/common/cli_commands.py 7 0 100%
service/common/error_handlers.py 38 13 66% 32, 38-40, 62-64, 77-79, 107-109
service/common/log_handlers.py 11 1 91% 35
service/common/status.py 45 0 100%
service/config.py 5 0 100%
service/models.py 119 0 100%
service/routes.py 41 1 98% 54
----------------------------------------------------------------
TOTAL 284 18 94%
----------------------------------------------------------------------
Ran 32 tests in 1.267s
OK
As a Marketing Manager I need the ability to create all recommendations made to a given user so that I can store new product recommendations being offered
Details and Assumptions
We will create recommendations in a PostgreSQL database
Empty list of recommendations will be gracefully processed by the consuming layer
Error to create recommendations is a different scenario where this service is unable to query and update recommendations
Acceptance Criteria
Given the service is running When the recommendations are created for a user Then I should have the latest list of recommendations stored in the DB for this user