Skip to content

Add tests for ipdevinfo refresh jobs functions#3496

Merged
johannaengland merged 1 commit intoUninett:masterfrom
johannaengland:tests/add-ipdevpoll-refresh
Sep 3, 2025
Merged

Add tests for ipdevinfo refresh jobs functions#3496
johannaengland merged 1 commit intoUninett:masterfrom
johannaengland:tests/add-ipdevpoll-refresh

Conversation

@johannaengland
Copy link
Copy Markdown
Contributor

Scope and purpose

Fixes #3448.

Contributor Checklist

Every pull request should have this checklist filled out, no matter how small it is.
More information about contributing to NAV can be found in the
Hacker's guide to NAV.

  • Added a changelog fragment for towncrier
    • only added tests
  • Added/amended tests for new/changed code
  • Added/changed documentation
  • Linted/formatted the code with ruff, easiest by using pre-commit
  • The first line of the commit message continues the sentence "If applied, this commit will ...", starts with a capital letter, does not end with punctuation and is 50 characters or less long. See https://cbea.ms/git-commit/
  • This pull request is based on the correct upstream branch: For a patch/bugfix affecting the latest stable version, it should be based on that version's branch (<major>.<minor>.x). For a new feature or other additions, it should be based on master.
  • If applicable: Created new issues if this PR does not fix the issue completely/there is further work to be done
  • If this results in changes in the UI: Added screenshots of the before and after
  • If this adds a new Python source code file: Added the boilerplate header to that file

@johannaengland johannaengland requested a review from a team September 2, 2025 08:06
@johannaengland johannaengland self-assigned this Sep 2, 2025
@johannaengland johannaengland added tests nonews No news fragment is necessary for this PR (e.g. refactoring, cleanups, workflow/development changes) labels Sep 2, 2025
@codecov
Copy link
Copy Markdown

codecov bot commented Sep 2, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.16%. Comparing base (a559b37) to head (a80d755).
⚠️ Report is 342 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3496      +/-   ##
==========================================
+ Coverage   61.09%   61.16%   +0.07%     
==========================================
  Files         610      610              
  Lines       44715    44715              
  Branches       43       43              
==========================================
+ Hits        27319    27352      +33     
+ Misses      17386    17353      -33     
  Partials       10       10              

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Contributor

@Simrayz Simrayz left a comment

Choose a reason for hiding this comment

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

LGTM.

Nitpick/considerations: I like organizing tests under a single class, and then omit the name of the function I'm testing. Also using variations of given/when/then as suggested to me earlier is a good convention.

@johannaengland johannaengland requested review from a team and Simrayz September 2, 2025 12:30
Copy link
Copy Markdown
Contributor

@Simrayz Simrayz left a comment

Choose a reason for hiding this comment

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

Mailchimp Yes LGTM

@johannaengland johannaengland force-pushed the tests/add-ipdevpoll-refresh branch from c5c436f to a80d755 Compare September 3, 2025 07:17
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Sep 3, 2025

@johannaengland johannaengland merged commit c1fcd2f into Uninett:master Sep 3, 2025
15 checks passed
@johannaengland johannaengland deleted the tests/add-ipdevpoll-refresh branch September 3, 2025 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

nonews No news fragment is necessary for this PR (e.g. refactoring, cleanups, workflow/development changes) tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add test coverage to refresh_ipdevinfo_job function in web/ipdevinfo/views.py

2 participants