Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinkhao committed Oct 12, 2023
1 parent 09e6ccf commit f09cd6d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
1 change: 1 addition & 0 deletions wms_connector/tests/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ def setUpClass(cls):
cls.backend = cls.env.ref("wms_connector.demo_wms_backend")
cls.backend.directory_path = str(uuid.uuid1()) + "/"
cls.aq_before = cls.env["attachment.queue"].search([])
cls.warehouse = cls.env.ref("stock.warehouse0")
# cls.loader = FakeModelLoader(cls.env, cls.__module__)
# cls.loader.backup_registry()
#
Expand Down
12 changes: 8 additions & 4 deletions wms_connector/tests/test_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,17 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo.tests.common import TransactionCase
from .common import WmsConnectorCommon


class TestExportFile(TransactionCase):
class TestExportFile(WmsConnectorCommon):
def setUp(self):
super().setUp()
self.warehouse = self.env.ref("stock.warehouse0")
self.warehouse.active_wms_sync = True

def test_run_export_cron(self):
# def test_run_export_cron(self):
# self.warehouse.wms_export_cron_id.method_direct_trigger()

def test_export_product(self):
self.warehouse.refresh_wms_products()
self.warehouse.wms_export_cron_id.method_direct_trigger()
self.assertNewAttachmentQueue()

0 comments on commit f09cd6d

Please sign in to comment.