fix(ci): Reset mock calls#6288
Conversation
|
@saurabh6790, thanks for the contribution, but we do not accept pull requests on a master. Please close this PR and raise PR on an develop branch. |
|
| Filename | Overview |
|---|---|
| press/press/doctype/incident/test_incident.py | Single-line fix adds mock_calls_create.reset_mock() before the second resolve_incidents() call in test_no_calls_before_investigator_actions to scope the subsequent assert_not_called() check to only the calls made after that point. |
Sequence Diagram
sequenceDiagram
participant Test as test_no_calls_before_investigator_actions
participant RI as resolve_incidents()
participant Mock as mock_calls_create
Test->>RI: call (status=Acknowledged, interval not elapsed)
RI-->>Mock: (no call made)
Test->>Mock: assert_not_called() ✓
Note over Test: db_set modified time back (interval now elapsed)
Test->>Mock: reset_mock() ← NEW: scope assertion to this point
Test->>RI: call (interval elapsed, investigator not Completed)
RI-->>Mock: (no call made — investigator not done)
Test->>Mock: assert_not_called() ✓
Test->>Test: investigator.db_set("status", "Completed")
Test->>RI: call (investigator Completed)
RI->>Mock: create(...)
Test->>Mock: assert_called_once() ✓
Reviews (1): Last reviewed commit: "fix(ci): Reset mock calls" | Re-trigger Greptile
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #6288 +/- ##
===========================================
+ Coverage 0 55.91% +55.91%
===========================================
Files 0 910 +910
Lines 0 75619 +75619
Branches 0 522 +522
===========================================
+ Hits 0 42282 +42282
- Misses 0 33309 +33309
- Partials 0 28 +28
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
No description provided.