[REF] Code quality improvements and structure fixes
- Add mypy.ini configuration to exclude migration scripts - Rename migration files to proper snake_case (post-migration.py → post_migration.py) - Add __init__.py to migration directories for proper Python package structure - Add new portal access tests for website_sale_aplicoop - Code formatting improvements (black, isort) - Update copilot instructions and project configuration Related to previous code quality refactoring work.
This commit is contained in:
parent
380d05785f
commit
cf9ea887c1
30 changed files with 1129 additions and 1102 deletions
|
|
@ -139,7 +139,8 @@ class TestProductDiscoveryUnion(TransactionCase):
|
|||
"""Test discovery includes products from linked categories."""
|
||||
self.group_order.category_ids = [(4, self.category1.id)]
|
||||
|
||||
discovered = self.group_order.product_ids # Computed
|
||||
# Computed placeholder to ensure discovery logic is exercised during test setup
|
||||
_ = self.group_order.product_ids
|
||||
# Should include cat1_product and supplier_product (both in category1)
|
||||
# Note: depends on how discovery is computed
|
||||
|
||||
|
|
@ -346,9 +347,13 @@ class TestDeepCategoryHierarchies(TransactionCase):
|
|||
# Attempt to create circular ref may fail
|
||||
try:
|
||||
self.cat_l1.parent_id = self.cat_l5.id # Creates loop
|
||||
except:
|
||||
# Expected: Odoo should prevent circular refs
|
||||
pass
|
||||
except Exception as exc:
|
||||
# Expected: Odoo should prevent circular refs. Log for visibility.
|
||||
import logging
|
||||
|
||||
logging.getLogger(__name__).info(
|
||||
"Expected exception creating circular category: %s", str(exc)
|
||||
)
|
||||
|
||||
|
||||
class TestEmptySourcesDiscovery(TransactionCase):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue