-
Notifications
You must be signed in to change notification settings - Fork 29
🎨 Add program unit tests #7524
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
🎨 Add program unit tests #7524
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #7524 +/- ##
==========================================
+ Coverage 87.44% 87.51% +0.07%
==========================================
Files 1740 1733 -7
Lines 67389 67199 -190
Branches 1143 1143
==========================================
- Hits 58931 58812 -119
+ Misses 8138 8067 -71
Partials 320 320
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thx
@@ -499,7 +499,7 @@ def _patch(href): | |||
return data.status_href, data.result_href | |||
|
|||
return mocker.patch( | |||
"simcore_service_api_server.services.webserver._get_lrt_urls", | |||
"simcore_service_api_server.services_http.webserver._get_lrt_urls", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TIP: to avoid these it is better if you import the module and then patch the object. It is more resistant to refactoring. Also add auto_spec=True
to enhance validity of your mock
import simcore_service_api_server.services_http.webserver
mocker.patch.object(simcore_service_api_server.services_http.webserver,._get_lrt_urls", auto_spec=True, side_effect=_get_lrt_urls)
) | ||
async def test_create_program_job( | ||
client: AsyncClient, | ||
mocked_webserver_rest_api_base, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Annotate all fixtures
These tests have been added here instead (using the new catalog client): #7541 |
What do these changes do?
Related issue/s
How to test
Dev-ops checklist