Skip to content

fix: flaky assignment test#103

Merged
pwnage101 merged 1 commit into
mainfrom
pwnage101/fix-flaky-assignment-test
Mar 17, 2026
Merged

fix: flaky assignment test#103
pwnage101 merged 1 commit into
mainfrom
pwnage101/fix-flaky-assignment-test

Conversation

@pwnage101

Copy link
Copy Markdown
Member

No description provided.

@pwnage101
pwnage101 requested review from a team as code owners March 17, 2026 01:14
Copilot AI review requested due to automatic review settings March 17, 2026 01:14
@pwnage101
pwnage101 requested a review from a team as a code owner March 17, 2026 01:14

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Stabilizes a flaky content assignment task test by making the “start_date” trigger property deterministic via frozen time, aligning the expected Braze payload with the time-dependent logic in get_self_paced_normalized_start_date().

Changes:

  • Freeze time for test_send_email_for_new_assignment to eliminate dependence on the wall clock.
  • Replace the expected start_date from datetime.now()-derived to a fixed timestamp matching the frozen time.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov

codecov Bot commented Mar 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.01%. Comparing base (2efc827) to head (875517d).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #103   +/-   ##
=======================================
  Coverage   84.01%   84.01%           
=======================================
  Files         144      144           
  Lines       12226    12226           
  Branches     1170     1170           
=======================================
  Hits        10272    10272           
  Misses       1625     1625           
  Partials      329      329           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@pwnage101
pwnage101 force-pushed the pwnage101/fix-flaky-assignment-test branch from 957aeaa to e40102c Compare March 17, 2026 18:04
Copilot AI review requested due to automatic review settings March 17, 2026 18:33
@pwnage101
pwnage101 force-pushed the pwnage101/fix-flaky-assignment-test branch from e40102c to 875517d Compare March 17, 2026 18:33

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request updates a Braze email task test to be deterministic by freezing the system time and aligning the expected start_date trigger property with the frozen timestamp.

Changes:

  • Freeze time for test_send_email_for_new_assignment using freezegun.freeze_time.
  • Replace the previously dynamic start_date expectation with a fixed value matching the frozen time.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread enterprise_access/apps/content_assignments/tests/test_tasks.py
@pwnage101
pwnage101 merged commit cd30bff into main Mar 17, 2026
9 checks passed
@pwnage101
pwnage101 deleted the pwnage101/fix-flaky-assignment-test branch March 17, 2026 19:07
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.

3 participants