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

test: fix test_missing_uid #323

Merged
merged 1 commit into from
Apr 26, 2024
Merged

test: fix test_missing_uid #323

merged 1 commit into from
Apr 26, 2024

Conversation

bdrung
Copy link
Collaborator

@bdrung bdrung commented Apr 22, 2024

Report._get_ignore_dom() calls os.geteuid() instead of os.getuid().

Fix test_missing_uid to mock os.geteuid instead of os.getuid, use MagicMock, and check that the mock was called.

`Report._get_ignore_dom()` calls `os.geteuid()` instead of
`os.getuid()`.

Fix `test_missing_uid` to mock `os.geteuid` instead of `os.getuid`, use
`MagicMock`, and check that the mock was called.
Copy link

codecov bot commented Apr 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.33%. Comparing base (3c6a27c) to head (82ee0f1).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #323      +/-   ##
==========================================
+ Coverage   82.30%   82.33%   +0.02%     
==========================================
  Files          94       94              
  Lines       19289    19288       -1     
  Branches     3105     3106       +1     
==========================================
+ Hits        15876    15880       +4     
+ Misses       2914     2911       -3     
+ Partials      499      497       -2     

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

@bdrung bdrung requested a review from schopin-pro April 22, 2024 10:27
@schopin-pro schopin-pro merged commit 04af911 into canonical:main Apr 26, 2024
21 checks passed
@bdrung bdrung deleted the mocking branch April 26, 2024 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants