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 @@ ...@@ -26,7 +26,6 @@
############################################################################## ##############################################################################
from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from erp5.component.extension import PandasInventory
import transaction import transaction
class PandasInventoryTest(ERP5TypeTestCase): class PandasInventoryTest(ERP5TypeTestCase):
...@@ -119,8 +118,8 @@ class PandasInventoryTest(ERP5TypeTestCase): ...@@ -119,8 +118,8 @@ class PandasInventoryTest(ERP5TypeTestCase):
def test_01_fillBigArrayTest(self): def test_01_fillBigArrayTest(self):
resource_uid = self.sale_order['1'].getResourceUid() resource_uid = self.sale_order['1'].getResourceUid()
data = self.portal.portal_skins.erp5_wendelin_inventory.Base_zGetStockByResource(resource_uid=resource_uid) data = self.portal.Base_zGetStockByResource(resource_uid=resource_uid)
self.portal.portal_skins.erp5_wendelin_inventory.Base_convertResultsToBigArray( self.portal.Base_convertResultsToBigArray(
data, data,
reference='TestingFillBigArray' reference='TestingFillBigArray'
) )
...@@ -132,8 +131,8 @@ class PandasInventoryTest(ERP5TypeTestCase): ...@@ -132,8 +131,8 @@ class PandasInventoryTest(ERP5TypeTestCase):
def test_02_extendBigArrayTest(self): def test_02_extendBigArrayTest(self):
resource_uid = self.sale_order['1'].getResourceUid() resource_uid = self.sale_order['1'].getResourceUid()
data = self.portal.portal_skins.erp5_wendelin_inventory.Base_zGetStockByResource(resource_uid=resource_uid) data = self.portal.Base_zGetStockByResource(resource_uid=resource_uid)
self.portal.portal_skins.erp5_wendelin_inventory.Base_convertResultsToBigArray( self.portal.Base_convertResultsToBigArray(
data, data,
reference='TestingExtendBigArray' reference='TestingExtendBigArray'
) )
...@@ -143,7 +142,7 @@ class PandasInventoryTest(ERP5TypeTestCase): ...@@ -143,7 +142,7 @@ class PandasInventoryTest(ERP5TypeTestCase):
data_array = self.portal.portal_catalog(portal_type='Data Array', reference='TestingExtendBigArray')[0].getObject() data_array = self.portal.portal_catalog(portal_type='Data Array', reference='TestingExtendBigArray')[0].getObject()
current_size = len(data_array) current_size = len(data_array)
self.portal.portal_skins.erp5_wendelin_inventory.Base_extendBigArray( self.portal.Base_extendBigArray(
data_array.getArray(), data_array.getArray(),
data_array.getArray() data_array.getArray()
) )
...@@ -158,15 +157,15 @@ class PandasInventoryTest(ERP5TypeTestCase): ...@@ -158,15 +157,15 @@ class PandasInventoryTest(ERP5TypeTestCase):
def test_03_importCategoryInformationTest(self): def test_03_importCategoryInformationTest(self):
resource_uid = self.sale_order['1'].getResourceUid() resource_uid = self.sale_order['1'].getResourceUid()
data = self.portal.portal_skins.erp5_wendelin_inventory.Base_zGetStockByResource(resource_uid=resource_uid) data = self.portal.Base_zGetStockByResource(resource_uid=resource_uid)
self.portal.portal_skins.erp5_wendelin_inventory.Base_convertResultsToBigArray( self.portal.Base_convertResultsToBigArray(
data, data,
reference='TestingImportCategoryInformation' reference='TestingImportCategoryInformation'
) )
transaction.commit() transaction.commit()
self.tic() self.tic()
array = self.portal.portal_skins.erp5_wendelin_inventory.Base_fillPandasInventoryCategoryList( array = self.portal.Base_fillPandasInventoryCategoryList(
'TestingImportCategoryInformation', 'TestingImportCategoryInformation',
verbose=False, verbose=False,
duplicate_category=False duplicate_category=False
...@@ -180,8 +179,8 @@ class PandasInventoryTest(ERP5TypeTestCase): ...@@ -180,8 +179,8 @@ class PandasInventoryTest(ERP5TypeTestCase):
def test_04_getMovementHistoryListTest(self): def test_04_getMovementHistoryListTest(self):
resource_uid = self.sale_order['1'].getResourceUid() resource_uid = self.sale_order['1'].getResourceUid()
data = self.portal.portal_skins.erp5_wendelin_inventory.Base_zGetStockByResource(resource_uid=resource_uid) data = self.portal.Base_zGetStockByResource(resource_uid=resource_uid)
self.portal.portal_skins.erp5_wendelin_inventory.Base_convertResultsToBigArray( self.portal.Base_convertResultsToBigArray(
data, data,
reference='TestingGetMovementHistoryList' reference='TestingGetMovementHistoryList'
) )
...@@ -191,7 +190,7 @@ class PandasInventoryTest(ERP5TypeTestCase): ...@@ -191,7 +190,7 @@ class PandasInventoryTest(ERP5TypeTestCase):
result = self.portal.portal_catalog(portal_type='Data Array', reference='TestingGetMovementHistoryList') result = self.portal.portal_catalog(portal_type='Data Array', reference='TestingGetMovementHistoryList')
self.assertTrue(len(result) != 0) self.assertTrue(len(result) != 0)
df = self.portal.portal_skins.erp5_wendelin_inventory.Base_filterInventoryDataFrame( df = self.portal.Base_filterInventoryDataFrame(
is_accountable=True, is_accountable=True,
resource_uid=resource_uid, resource_uid=resource_uid,
data_array_reference='TestingGetMovementHistoryList' data_array_reference='TestingGetMovementHistoryList'
......
...@@ -45,9 +45,7 @@ ...@@ -45,9 +45,7 @@
<item> <item>
<key> <string>text_content_warning_message</string> </key> <key> <string>text_content_warning_message</string> </key>
<value> <value>
<tuple> <tuple/>
<string>W: 29, 0: Unused PandasInventory imported from erp5.component.extension (unused-import)</string>
</tuple>
</value> </value>
</item> </item>
<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