-
-
Notifications
You must be signed in to change notification settings - Fork 719
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
34 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
from . import test_calendar_orderpoint | ||
from . import test_orderpoint_json_lead_days_popover | ||
from . import test_orderpoint_lead_days_date |
This file contains 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
27 changes: 27 additions & 0 deletions
27
stock_warehouse_calendar_orderpoint/tests/test_orderpoint_json_lead_days_popover.py
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Copyright 2022 Camptocamp SA | ||
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl) | ||
|
||
from json import loads | ||
|
||
from freezegun import freeze_time | ||
|
||
from .common import CommonCalendarOrderpoint | ||
|
||
|
||
class TestOrderpointJsonPopover(CommonCalendarOrderpoint): | ||
"""Tests orderpoint's Json popover info""" | ||
|
||
@freeze_time("2024-04-01 10:00") | ||
def test_00_json_popover_info(self): | ||
self.wh.orderpoint_calendar_id = self.reordering_calendar | ||
self.wh.calendar_id = self.working_hours_calendar | ||
self.reordering_rule.delay = 5 | ||
self.env["stock.warehouse.orderpoint"].invalidate_cache( | ||
["json_lead_days_popover"] | ||
) | ||
info = loads(self.orderpoint.json_lead_days_popover) | ||
self.assertIn("lead_days_description", info) | ||
self.assertIn( | ||
"<td>Reordering Date</td><td class='text-right'>04/03/2024</td>", | ||
info["lead_days_description"], | ||
) |
This file contains 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