Commit 93fd9aaf authored by Tatuya Kamada's avatar Tatuya Kamada

erp5_wendeln_inventory: Fix to call external method on ERP5Site.

parent b6e6a310
......@@ -26,7 +26,6 @@
##############################################################################
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from erp5.component.extension import PandasInventory
import transaction
class PandasInventoryTest(ERP5TypeTestCase):
......@@ -119,8 +118,8 @@ class PandasInventoryTest(ERP5TypeTestCase):
def test_01_fillBigArrayTest(self):
resource_uid = self.sale_order['1'].getResourceUid()
data = self.portal.portal_skins.erp5_wendelin_inventory.Base_zGetStockByResource(resource_uid=resource_uid)
self.portal.portal_skins.erp5_wendelin_inventory.Base_convertResultsToBigArray(
data = self.portal.Base_zGetStockByResource(resource_uid=resource_uid)
self.portal.Base_convertResultsToBigArray(
data,
reference='TestingFillBigArray'
)
......@@ -132,8 +131,8 @@ class PandasInventoryTest(ERP5TypeTestCase):
def test_02_extendBigArrayTest(self):
resource_uid = self.sale_order['1'].getResourceUid()
data = self.portal.portal_skins.erp5_wendelin_inventory.Base_zGetStockByResource(resource_uid=resource_uid)
self.portal.portal_skins.erp5_wendelin_inventory.Base_convertResultsToBigArray(
data = self.portal.Base_zGetStockByResource(resource_uid=resource_uid)
self.portal.Base_convertResultsToBigArray(
data,
reference='TestingExtendBigArray'
)
......@@ -143,7 +142,7 @@ class PandasInventoryTest(ERP5TypeTestCase):
data_array = self.portal.portal_catalog(portal_type='Data Array', reference='TestingExtendBigArray')[0].getObject()
current_size = len(data_array)
self.portal.portal_skins.erp5_wendelin_inventory.Base_extendBigArray(
self.portal.Base_extendBigArray(
data_array.getArray(),
data_array.getArray()
)
......@@ -158,15 +157,15 @@ class PandasInventoryTest(ERP5TypeTestCase):
def test_03_importCategoryInformationTest(self):
resource_uid = self.sale_order['1'].getResourceUid()
data = self.portal.portal_skins.erp5_wendelin_inventory.Base_zGetStockByResource(resource_uid=resource_uid)
self.portal.portal_skins.erp5_wendelin_inventory.Base_convertResultsToBigArray(
data = self.portal.Base_zGetStockByResource(resource_uid=resource_uid)
self.portal.Base_convertResultsToBigArray(
data,
reference='TestingImportCategoryInformation'
)
transaction.commit()
self.tic()
array = self.portal.portal_skins.erp5_wendelin_inventory.Base_fillPandasInventoryCategoryList(
array = self.portal.Base_fillPandasInventoryCategoryList(
'TestingImportCategoryInformation',
verbose=False,
duplicate_category=False
......@@ -180,8 +179,8 @@ class PandasInventoryTest(ERP5TypeTestCase):
def test_04_getMovementHistoryListTest(self):
resource_uid = self.sale_order['1'].getResourceUid()
data = self.portal.portal_skins.erp5_wendelin_inventory.Base_zGetStockByResource(resource_uid=resource_uid)
self.portal.portal_skins.erp5_wendelin_inventory.Base_convertResultsToBigArray(
data = self.portal.Base_zGetStockByResource(resource_uid=resource_uid)
self.portal.Base_convertResultsToBigArray(
data,
reference='TestingGetMovementHistoryList'
)
......@@ -191,7 +190,7 @@ class PandasInventoryTest(ERP5TypeTestCase):
result = self.portal.portal_catalog(portal_type='Data Array', reference='TestingGetMovementHistoryList')
self.assertTrue(len(result) != 0)
df = self.portal.portal_skins.erp5_wendelin_inventory.Base_filterInventoryDataFrame(
df = self.portal.Base_filterInventoryDataFrame(
is_accountable=True,
resource_uid=resource_uid,
data_array_reference='TestingGetMovementHistoryList'
......
......@@ -45,9 +45,7 @@
<item>
<key> <string>text_content_warning_message</string> </key>
<value>
<tuple>
<string>W: 29, 0: Unused PandasInventory imported from erp5.component.extension (unused-import)</string>
</tuple>
<tuple/>
</value>
</item>
<item>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment