Commit 639b7122 authored by Mario Jorge Amaral's avatar Mario Jorge Amaral

Tests to getColumnItemList and getLineItemList.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk/utils@44639 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6d828288
......@@ -530,12 +530,17 @@ class TestServer(HandlerTestCase):
def testGetColumnItemList(self):
"""Test if manager can get the list of column item"""
data = encodestring(open("./data/granulate_table_test.odt").read())
self.assertRaises(Fault, self.proxy.getColumnItemList, (data, "id", "odt"))
columns = self.proxy.getColumnItemList(data, "SoccerTeams", "odt")
self.assertEquals([[0, 'Name'], [1, 'Country']], columns)
def testGetLineItemList(self):
"""Test if manager can get the list of lines items"""
data = encodestring(open("./data/granulate_test.odt").read())
self.assertRaises(Fault, self.proxy.getLineItemList, (data, "id", "odt"))
data = encodestring(open("./data/granulate_table_test.odt").read())
line_item_list = self.proxy.getLineItemList(data, "Developers", "odt")
self.assertEquals([['Name', 'Hugo'], ['Phone', '+55 (22) 8888-8888'],
['Email', 'hugomaia@tiolive.com'], ['Name', 'Rafael'],
['Phone', '+55 (22) 9999-9999'],
['Email', 'rafael@tiolive.com']], line_item_list)
def testGetImageItemList(self):
"""Test if manager can get the list of images items"""
......
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