-
Notifications
You must be signed in to change notification settings - Fork 16
fix: Newhusb tests were broken with latest Superdesk v3.0 beta.1 #1352
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
base: develop
Are you sure you want to change the base?
Conversation
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 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.
| def app_session(context: TestAppContext) -> None: | ||
| print("app_session") |
Copilot
AI
Sep 5, 2025
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.
Remove the debug print statement as it's not appropriate for production test code.
| def app_session(context: TestAppContext) -> None: | |
| print("app_session") |
Purpose
Modify the Behave and Pytest tests to use the new superdesk.core.tests module.
Depends on: superdesk/superdesk-core#3021