Skip to content

Conversation

@milov-dmitriy
Copy link
Collaborator

Минорный рефакторинг для порядка:

  • Перенес структуру тестов из Э
  • Заглушил "мусорные" CoverageWarning при запуске тестов

@milov-dmitriy milov-dmitriy requested a review from Copilot January 15, 2026 16:24
@milov-dmitriy milov-dmitriy self-assigned this Jan 15, 2026
@milov-dmitriy milov-dmitriy added the python Pull requests that update Python code label Jan 15, 2026
Copy link
Contributor

Copilot AI left a 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 the test structure by moving the System Administrator creation from the global setup_session fixture to a local fixture that is only used by tests that specifically need to verify system directory protection. Additionally, it improves test execution by suppressing coverage warnings for auto-generated files.

Changes:

  • Moved System Administrator creation from global setup to a test-specific fixture
  • Removed System Administrator from expected test results in search and role tests
  • Configured coverage to ignore auto-generated dishka factory files

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tests/conftest.py Removed System Administrator creation from global setup_session fixture and cleaned up unused imports
tests/test_api/test_main/test_router/conftest.py Added add_system_administrator fixture for tests requiring system directory
tests/test_api/test_main/test_router/test_delete.py Added add_system_administrator fixture dependency
tests/test_api/test_main/test_router/test_modify.py Added add_system_administrator fixture dependency
tests/test_api/test_main/test_router/test_modify_dn.py Added add_system_administrator fixture dependency
tests/search_request_datasets.py Removed System Administrator from expected search results in test datasets
tests/test_api/test_main/test_router/test_search.py Removed System Administrator from expected search results
tests/test_ldap/test_roles/test_search.py Removed System Administrator from expected role search results
pyproject.toml Added coverage omit pattern for dishka factory files
docker-compose.test.yml Added CoverageWarning suppression to pytest command

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@milov-dmitriy milov-dmitriy force-pushed the refactor_merge_enterprise_tests branch from c012848 to e008445 Compare January 15, 2026 16:38
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 10 out of 10 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

python Pull requests that update Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants