The dead-code cleanup dropped 11 test files that were never wired into tests/__init__.py. Reviewing what they covered turned up real holes, so the worthwhile ones come back, rewritten against the current schema. Blacklists were the serious gap: product, supplier and category exclusions have absolute priority over product discovery and nothing exercised them. The old file had two separate defects. Its supplier fixtures wrote `main_seller_id` directly, but product_main_seller computes that field from `variant_seller_ids`, so the compute reset it to False and the blacklist had nothing to exclude; they now create real supplierinfo records. Worse, four whole classes asserted against `group_order.product_ids` -- the m2m *input* -- instead of the discovery result, so they set `category_ids` and then checked a field they never touched. Those go through `_get_products_for_group_order` now, and three tests that had no assertions at all got some. The remaining three failures were test bugs too, all Odoo 17->18 leftovers: * Date cases assumed `pickup_date` derives from `start_date`. The chain is cutoff -> pickup -> delivery, and a recurring order whose start date has passed rolls forward to the current cycle, so a 2024 order has no 2024 pickup. The new file anchors on future dates and finds the next 29 February dynamically, with a class documenting the roll-forward itself. * `/eskaera/labels` is `type="json"`; the old test hit it with a plain GET and read the resulting 400 as a bug. It is called over JSON-RPC now, and a test pins the 400 so nobody repeats it. Also `uom.uom.categ` -> `uom.category`. * `price_include` is computed in 18.0, so fixtures must set `price_include_override`. On top of that `_get_price` filters taxes by company and defaults to `env.company`, not the fixture's, which left the tax list empty -- `tax_included` was False for the wrong reason. Two of the portal tests were passing for the wrong reason as well: the access guard bounced them to /eskaera, which also answers 200. Membership has to be set from the member side with `is_group`, and a new test checks the final URL rather than the status alone. Each fixture that can silently build the wrong thing now carries a guard test. Left out on purpose: three files were unimplemented placeholders, and test_draft_persistence still deserves recovering (see the notes file). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
25 lines
1.2 KiB
Python
25 lines
1.2 KiB
Python
# Copyright 2025 Criptomart
|
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl)
|
|
|
|
from . import test_group_order # noqa: F401
|
|
from . import test_group_order_slug # noqa: F401
|
|
from . import test_res_partner # noqa: F401
|
|
from . import test_product_extension # noqa: F401
|
|
from . import test_eskaera_shop # noqa: F401
|
|
from . import test_templates_rendering # noqa: F401
|
|
from . import test_record_rules # noqa: F401
|
|
from . import test_multi_company # noqa: F401
|
|
from . import test_save_order_endpoints # noqa: F401
|
|
from . import test_date_calculations # noqa: F401
|
|
from . import test_phase3_confirm_eskaera # noqa: F401
|
|
from . import test_pricing_with_pricelist # noqa: F401
|
|
from . import test_portal_sale_order_creation # noqa: F401
|
|
from . import test_cron_picking_batch # noqa: F401
|
|
from . import test_group_order_status_endpoint # noqa: F401
|
|
from . import test_home_delivery # noqa: F401
|
|
from . import test_forecasted_stock # noqa: F401
|
|
from . import test_online_payment # noqa: F401
|
|
from . import test_product_discovery # noqa: F401
|
|
from . import test_date_edge_cases # noqa: F401
|
|
from . import test_portal_routes # noqa: F401
|
|
from . import test_price_with_taxes_included # noqa: F401
|