|
4 | 4 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
5 | 5 |
|
6 | 6 |
|
| 7 | +from odoo.exceptions import UserError, ValidationError |
| 8 | + |
7 | 9 | from .common import TestCommon |
8 | 10 |
|
9 | 11 |
|
10 | 12 | class TestPicking(TestCommon): |
11 | | - # def test_date_backdating_yesterday(self): |
12 | | - # date_backdating = self._get_datetime_backdating(1) |
13 | | - # self._transfer_picking_with_dates(date_backdating) |
14 | | - |
15 | | - # def test_date_backdating_last_month(self): |
16 | | - # date_backdating = self._get_datetime_backdating(31) |
17 | | - # self._transfer_picking_with_dates(date_backdating) |
18 | | - |
19 | | - # def test_date_backdating_future_wizard(self): |
20 | | - # date_backdating = self._get_datetime_backdating(-1) |
21 | | - # with self.assertRaises(ValidationError): |
22 | | - # self._transfer_picking_with_dates(date_backdating) |
23 | | - |
24 | | - # def test_date_backdating_future(self): |
25 | | - # date_backdating_1 = self._get_datetime_backdating(-1) |
26 | | - # date_backdating_2 = self._get_datetime_backdating(-2) |
27 | | - # with self.assertRaises(UserError): |
28 | | - # self._transfer_picking_with_dates(date_backdating_1, date_backdating_2) |
| 13 | + def test_date_backdating_yesterday(self): |
| 14 | + date_backdating = self._get_datetime_backdating(1) |
| 15 | + self._transfer_picking_with_dates(date_backdating) |
| 16 | + |
| 17 | + def test_date_backdating_last_month(self): |
| 18 | + date_backdating = self._get_datetime_backdating(31) |
| 19 | + self._transfer_picking_with_dates(date_backdating) |
| 20 | + |
| 21 | + def test_date_backdating_future_wizard(self): |
| 22 | + date_backdating = self._get_datetime_backdating(-1) |
| 23 | + with self.assertRaises(ValidationError): |
| 24 | + self._transfer_picking_with_dates(date_backdating) |
| 25 | + |
| 26 | + def test_date_backdating_future(self): |
| 27 | + date_backdating_1 = self._get_datetime_backdating(-1) |
| 28 | + date_backdating_2 = self._get_datetime_backdating(-2) |
| 29 | + with self.assertRaises(UserError): |
| 30 | + self._transfer_picking_with_dates(date_backdating_1, date_backdating_2) |
29 | 31 |
|
30 | 32 | def test_different_dates_backdating(self): |
31 | 33 | date_backdating_1 = self._get_datetime_backdating(1) |
|
0 commit comments