-
Notifications
You must be signed in to change notification settings - Fork 6
test(fix): destroy the default integration before testing #417
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
Conversation
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified FilesNo covered modified files...
|
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.
Pull Request Overview
This PR refactors tests to use dynamically generated identifiers instead of hardcoded values, preventing collisions in integration test runs.
- Introduces a new
fixtures.py
module for generating unique names, emails, usernames, and passwords. - Updates all integration tests (and one production method) to pull values from
fixtures
rather than literals. - Tweaks client test assertions to use the
MockSession
return value.
Reviewed Changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
tests/posit/connect/test_hooks.py | Expanded the deprecation warning match parameter |
tests/posit/connect/test_client.py | Updated session call assertions to use MockSession |
src/posit/connect/users.py | Replaced hardcoded password with fixtures.password() |
integration/tests/posit/connect/fixtures.py | Added fixtures module for unique test data |
integration/tests/posit/connect/***.py | Replaced literal test data with calls to fixtures |
Comments suppressed due to low confidence (2)
src/posit/connect/users.py:365
- The code now references
fixtures.password()
butfixtures
is not imported—addfrom posit.connect.tests.fixtures import password, name, email, username
(or the correct import path) at the top of this file.
... password=fixtures.password(),
integration/tests/posit/connect/test_system.py:44
Path
is used here but not imported—addfrom pathlib import Path
near the top of this test file.
path = (Path(__file__).parent / path).resolve()
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.
Seems clear and concise. The consistency and naming improvements were a nice improvement.
Starting in 2025.05.0, a default integration is created by Connect. We want to destroy that integration before running the test suite.