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

Fix mock in unit test after removing deprecated snowplow method #10738

Merged
merged 1 commit into from
Sep 18, 2024

Conversation

mikealfare
Copy link
Contributor

Problem

We removed a deprecated method, snowplow_tracker.Tracker.track_struct_event(), and replaced it with the suggested method snowplow_tracker.Tracker.track(). The former was mocked in a unit test and it was expected to be called. After the update, it did not get called as this method no longer existed.

Solution

Update the mock to reference the new method.

Checklist

  • I have read the contributing guide and understand what's expected of me.
  • I have run this code in development, and it appears to resolve the stated issue.
  • This PR includes tests, or tests are not required or relevant for this PR.
  • This PR has no interface changes (e.g., macros, CLI, logs, JSON artifacts, config files, adapter interface, etc.) or this PR has already received feedback and approval from Product or DX.
  • This PR includes type annotations for new and modified functions.

@mikealfare mikealfare self-assigned this Sep 18, 2024
@mikealfare mikealfare requested a review from a team as a code owner September 18, 2024 22:19
@cla-bot cla-bot bot added the cla:yes label Sep 18, 2024
Copy link

codecov bot commented Sep 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.96%. Comparing base (3e437a6) to head (a9e947d).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10738      +/-   ##
==========================================
+ Coverage   86.12%   88.96%   +2.83%     
==========================================
  Files         181      181              
  Lines       22964    22964              
==========================================
+ Hits        19777    20429     +652     
+ Misses       3187     2535     -652     
Flag Coverage Δ
integration 86.13% <ø> (+0.01%) ⬆️
unit 62.40% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
Unit Tests 62.40% <ø> (∅)
Integration Tests 86.13% <ø> (+0.01%) ⬆️

@colin-rogers-dbt colin-rogers-dbt merged commit f8bfd32 into main Sep 18, 2024
63 checks passed
@colin-rogers-dbt colin-rogers-dbt deleted the fix-remove-track-struct-event branch September 18, 2024 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants