Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor User Stats Tests to Pipeline-Dependent and Independent Updates #1015

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

TeachMeTW
Copy link
Contributor

Description

Updates our tests for user statistics to reflect the recent refactor that separates pipeline-dependent statistics (such as trip counts and pipeline range) from pipeline-independent statistics (such as last_call_ts). Simplified the comments for brevity and to match the new changes.

Changes

Pipeline-Dependent Stats:

The test now verifies that after running the intake pipeline via etc.runIntakePipeline, the user profile is updated with:

  • total_trips
  • labeled_trips
  • pipeline_range (with both start_ts and end_ts)

Pipeline-Independent Stats:

  • The test verifies that when a server API call is stored, the last_call_ts field is updated correctly in the user profile.

Testing

python -m unittest emission/tests/analysisTests/intakeTests/TestUserStat.py

…ats. Independent User Stats updates last call ts while Dependent User Stats updates range and trips. The two test cases should handle both scenarios.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant