fix: Newhusb tests were broken with latest Superdesk v3.0 beta.1#1352
Open
MarkLark86 wants to merge 7 commits into
Open
fix: Newhusb tests were broken with latest Superdesk v3.0 beta.1#1352MarkLark86 wants to merge 7 commits into
MarkLark86 wants to merge 7 commits into
Conversation
petrjasek
approved these changes
Sep 5, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR updates the Newsroom test infrastructure to be compatible with Superdesk v3.0 beta.1 by migrating from custom test implementations to the new superdesk.core.tests module.
- Replaced custom test fixtures and environment setup with standardized core test utilities
- Updated import statements to use the new
superdesk.core.testsmodule - Modified test configuration for pytest asyncio scope and rate limiting
- Refactored behave test environments to use new test factory pattern
Reviewed Changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/conftest.py | Replaces custom test fixtures with superdesk.core.tests imports and factory pattern |
| tests/core/test_saml.py | Updates test client usage pattern for SAML tests |
| tests/core/test_auth.py | Adds rate limiter configuration for auth tests |
| newsroom/tests/conftest.py | Major refactoring to use new test factory pattern and remove custom event loop handling |
| newsroom/tests/web_api/environment.py | Migrates to new behave test factory pattern |
| newsroom/tests/news_api/environment.py | Migrates to new behave test factory pattern |
| features/*/environment.py | Updates imports to remove deprecated before_scenario |
| features/mgmt_api/environment.py | Migrates to new behave test factory pattern |
| newsroom/users/module.py | Adds mongo configuration to users auth resource |
| newsroom/commands/remove_expired.py | Updates import path for RemoveExpiredItems |
| setup.cfg | Updates pytest asyncio configuration scope |
| dev-requirements.* | Updates dependencies including superdesk-core branch and test libraries |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Comment on lines
+85
to
+86
| def app_session(context: TestAppContext) -> None: | ||
| print("app_session") |
There was a problem hiding this comment.
Remove the debug print statement as it's not appropriate for production test code.
Suggested change
| def app_session(context: TestAppContext) -> None: | |
| print("app_session") |
eos87
approved these changes
Sep 5, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Modify the Behave and Pytest tests to use the new superdesk.core.tests module.
Depends on: superdesk/superdesk-core#3021