Commit d18c8480 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

stop using deprecated aliases of TestCase methods.

see http://docs.python.org/2/library/unittest.html#deprecated-aliases
parent fa7113c9
......@@ -83,8 +83,8 @@ class TestMaxmaDemoConfiguratorWorkflow(TestLiveConfiguratorWorkflowMixin):
response_dict = sequence.get("response_dict")
# configuration is finished. We are at the Install state.
# On maxma demo, installation is the first slide.
self.assertEquals('show', response_dict['command'])
self.assertEquals('Install', response_dict['next'])
self.assertEqual('show', response_dict['command'])
self.assertEqual('Install', response_dict['next'])
def stepSetMaxmaDemoWorkflow(self, sequence=None, sequence_list=None, **kw):
""" Set Consulting Workflow into Business Configuration """
......@@ -130,7 +130,7 @@ class TestMaxmaDemoConfiguratorWorkflow(TestLiveConfiguratorWorkflowMixin):
# Check Gadgets
for gadget in self.portal.portal_gadgets.searchFolder():
self.assertEquals('public', gadget.getValidationState(),
self.assertEqual('public', gadget.getValidationState(),
"%s is not public but %s" % (gadget.getRelativeUrl(),
gadget.getValidationState()))
gadget.Base_checkConsistency()
......@@ -140,11 +140,11 @@ class TestMaxmaDemoConfiguratorWorkflow(TestLiveConfiguratorWorkflowMixin):
reference=self.user_reference)
self.assertNotEquals(user.Person_getAvailableAssignmentValueList(), [])
self.assertEquals(user.getTitle(), "Jack Vale")
self.assertEquals(user.getValidationState(), "validated")
self.assertEquals(user.getSubordination(),
self.assertEqual(user.getTitle(), "Jack Vale")
self.assertEqual(user.getValidationState(), "validated")
self.assertEqual(user.getSubordination(),
'organisation_module/myorganisation')
self.assertEquals(user.getSubordinationTitle(), "Maxma Co")
self.assertEqual(user.getSubordinationTitle(), "Maxma Co")
### STEPS
DEFAULT_SEQUENCE_LIST = """
......
30
\ No newline at end of file
31
\ No newline at end of file
......@@ -114,13 +114,13 @@ class TestRunMyDocsConfiguratorWorkflowMixin(TestLiveConfiguratorWorkflowMixin):
""" Check if organisation was created fine """
business_configuration = sequence.get("business_configuration")
organisation_config_save = business_configuration['3']
self.assertEquals(organisation_config_save.getTitle(),
self.assertEqual(organisation_config_save.getTitle(),
"My Organisation")
self.assertEquals(1, len(organisation_config_save.contentValues()))
self.assertEqual(1, len(organisation_config_save.contentValues()))
organisation_config_item = organisation_config_save['1']
self.assertEquals(organisation_config_item.getPortalType(),
self.assertEqual(organisation_config_item.getPortalType(),
'Organisation Configurator Item')
self.assertEquals(organisation_config_item.getDefaultEmailText(),
self.assertEqual(organisation_config_item.getDefaultEmailText(),
'me@example.com')
def stepSetupUserAccountNumberThree(self, sequence=None, sequence_list=None, **kw):
......@@ -140,9 +140,9 @@ class TestRunMyDocsConfiguratorWorkflowMixin(TestLiveConfiguratorWorkflowMixin):
""" Check the multiple user account form """
response_dict = sequence.get("response_dict")
if 'command' in response_dict:
self.assertEquals('show', response_dict['command'])
self.assertEquals('Previous', response_dict['previous'])
self.assertEquals('Configure ERP5 Preferences', response_dict['next'])
self.assertEqual('show', response_dict['command'])
self.assertEqual('Previous', response_dict['previous'])
self.assertEqual('Configure ERP5 Preferences', response_dict['next'])
self.assertCurrentStep('RunMyDoc Preferences', response_dict)
def stepSetupPreferenceConfigurationBrazil(self, sequence=None, sequence_list=None, **kw):
......@@ -166,30 +166,30 @@ class TestRunMyDocsConfiguratorWorkflowMixin(TestLiveConfiguratorWorkflowMixin):
business_configuration = sequence.get("business_configuration")
person_config_save = business_configuration["5"]
person_config_item = person_config_save["1"]
self.assertEquals(person_config_item.getReference(), "person_creator")
self.assertEqual(person_config_item.getReference(), "person_creator")
person_config_item = person_config_save["2"]
self.assertEquals(person_config_item.getReference(), "person_assignee")
self.assertEqual(person_config_item.getReference(), "person_assignee")
person_config_item = person_config_save["3"]
self.assertEquals(person_config_item.getReference(), "person_assignor")
self.assertEqual(person_config_item.getReference(), "person_assignor")
def stepCheckMultipleUserAccountThreeFrance(self, sequence=None, sequence_list=None, **kw):
""" Check if the users were created correctly """
business_configuration = sequence.get("business_configuration")
person_config_save = business_configuration["5"]
person_config_item = person_config_save["1"]
self.assertEquals(person_config_item.getReference(), "french_creator")
self.assertEqual(person_config_item.getReference(), "french_creator")
person_config_item = person_config_save["2"]
self.assertEquals(person_config_item.getReference(), "french_assignee")
self.assertEqual(person_config_item.getReference(), "french_assignee")
person_config_item = person_config_save["3"]
self.assertEquals(person_config_item.getReference(), "french_assignor")
self.assertEqual(person_config_item.getReference(), "french_assignor")
def stepCheckSystemPreferenceAfterInstallation(self, sequence=None, sequence_list=None, **kw):
""" Check System Preference"""
system_preference = self.portal.portal_catalog.getResultValue(portal_type="System Preference")
conversion_dict = _getConversionServerDict()
self.assertEquals(system_preference.getPreferredOoodocServerPortNumber(),
self.assertEqual(system_preference.getPreferredOoodocServerPortNumber(),
conversion_dict['port'])
self.assertEquals(system_preference.getPreferredOoodocServerAddress(),
self.assertEqual(system_preference.getPreferredOoodocServerAddress(),
conversion_dict['hostname'])
def stepCheckUserPreferenceAfterInstallation(self, sequence=None, sequence_list=None, **kw):
......@@ -197,13 +197,13 @@ class TestRunMyDocsConfiguratorWorkflowMixin(TestLiveConfiguratorWorkflowMixin):
portal_catalog = self.portal.portal_catalog
preference = portal_catalog.getResultValue(portal_type="Preference",
title='Preference for Person Assignor')
self.assertEquals(preference.getPreferenceState(), "enabled")
self.assertEqual(preference.getPreferenceState(), "enabled")
preference = portal_catalog.getResultValue(portal_type="Preference",
title='Preference for Person Assignee')
self.assertEquals(preference.getPreferenceState(), "enabled")
self.assertEqual(preference.getPreferenceState(), "enabled")
preference = portal_catalog.getResultValue(portal_type="Preference",
title='Preference for Person Creator')
self.assertEquals(preference.getPreferenceState(), "enabled")
self.assertEqual(preference.getPreferenceState(), "enabled")
def _stepCheckKnowledgePadRole(self):
""" Check if Knowledge Pad is configured correctly """
......@@ -216,10 +216,10 @@ class TestRunMyDocsConfiguratorWorkflowMixin(TestLiveConfiguratorWorkflowMixin):
self.portal.KnowledgePad_addBoxList(uids=[gadget_uid],
active_pad_relative_url=pad.getRelativeUrl())
self.tic()
self.assertEquals(len(pad.contentValues()), 1)
self.assertEqual(len(pad.contentValues()), 1)
box = pad.contentValues()[0]
self.assertEquals(box.getValidationState(), 'visible')
self.assertEquals(box.getSpecialise(), 'portal_gadgets/test_wizard_gadget')
self.assertEqual(box.getValidationState(), 'visible')
self.assertEqual(box.getSpecialise(), 'portal_gadgets/test_wizard_gadget')
class TestRunMyDocsConfiguratorWorkflowFranceLanguage(TestRunMyDocsConfiguratorWorkflowMixin):
"""
......
12
\ No newline at end of file
13
\ No newline at end of file
668
\ No newline at end of file
669
\ No newline at end of file
62
\ No newline at end of file
63
\ No newline at end of file
......@@ -344,10 +344,10 @@ class TestEGovMixin(SecurityTestCase):
self.portal,
workflow_list=['egov_universal_workflow', 'egov_anonymous_workflow'])
self.assertNotEquals(worklist_dict, {})
self.assertEquals(worklist_dict.has_key(portal_type), True)
self.assertEqual(worklist_dict.has_key(portal_type), True)
portal_type_dict = worklist_dict[portal_type]
self.assertEquals(portal_type_dict.has_key(validation_state), True)
self.assertEquals(portal_type_dict[validation_state]['count'], count)
self.assertEqual(portal_type_dict.has_key(validation_state), True)
self.assertEqual(portal_type_dict[validation_state]['count'], count)
# relog with previous user
if previous_user in ('Anonymous User', 'ERP5TypeTestCase'):
......
765
\ No newline at end of file
766
\ No newline at end of file
......@@ -70,16 +70,16 @@ class TestDiscussionThread(SecurityTestCase):
thread_posts = thread.objectValues()
# thread should have only one post
self.assertEquals(len(thread_posts), 1)
self.assertEqual(len(thread_posts), 1)
# that unique post should have the right content
self.assertEquals(thread_posts[0].getTextContent(), thread_content)
self.assertEqual(thread_posts[0].getTextContent(), thread_content)
# Check that the thread is inserted in the forum module
self.assertEquals(thread.getParentValue().getRelativeUrl(), self.forum_module.getRelativeUrl())
self.assertEqual(thread.getParentValue().getRelativeUrl(), self.forum_module.getRelativeUrl())
# the thread should have been published
self.assertEquals(thread.getValidationState(), 'public')
self.assertEqual(thread.getValidationState(), 'public')
reply_content='Can we add a reply?'
post = thread.DiscussionThreadModule_addReply(
......@@ -98,10 +98,10 @@ class TestDiscussionThread(SecurityTestCase):
# original thread and reply:
# thread should have two posts
self.assertEquals(len(thread_posts), 2)
self.assertEqual(len(thread_posts), 2)
# Check that post was inserted in thread
self.assertEquals(post.getParentValue().getRelativeUrl(), thread.getRelativeUrl())
self.assertEqual(post.getParentValue().getRelativeUrl(), thread.getRelativeUrl())
def testSpyCannotAccessButVisitorCan(self):
"""
......@@ -131,7 +131,7 @@ class TestDiscussionThread(SecurityTestCase):
(self.portal.getId(), thread.getRelativeUrl()),
'visitor:visitor'
)
self.assertEquals(response.getStatus(), HTTP_OK)
self.assertEqual(response.getStatus(), HTTP_OK)
def testVisitorCannotPost(self):
"""
......@@ -201,4 +201,4 @@ class TestDiscussionThread(SecurityTestCase):
(self.portal.getId(), thread.getRelativeUrl()),
'another_forum_user:another_forum_user'
)
self.assertEquals(response.getStatus(), HTTP_OK)
self.assertEqual(response.getStatus(), HTTP_OK)
9
\ No newline at end of file
10
\ No newline at end of file
......@@ -109,9 +109,9 @@ class TestIngestion(ERP5TypeLiveTestCase):
filename = 'any_file.txt'
document = self.contributeFileWithUrl(script_id, filename=filename)
self.tic()
self.assertEquals(document.getPortalType(), 'Text')
self.assertEquals(document.getFilename(), filename)
self.assertEquals(document.getContentType(), 'text/plain')
self.assertEqual(document.getPortalType(), 'Text')
self.assertEqual(document.getFilename(), filename)
self.assertEqual(document.getContentType(), 'text/plain')
self.assertTrue(document.hasData())
def test_02_contributeTextFileWithExplicitExtensionfromUrl(self):
......@@ -122,9 +122,9 @@ class TestIngestion(ERP5TypeLiveTestCase):
script_id = 'ERP5Site_getTextFile.txt'
document = self.contributeFileWithUrl(script_id)
self.tic()
self.assertEquals(document.getPortalType(), 'Text')
self.assertEquals(document.getFilename(), script_id)
self.assertEquals(document.getContentType(), 'text/plain')
self.assertEqual(document.getPortalType(), 'Text')
self.assertEqual(document.getFilename(), script_id)
self.assertEqual(document.getContentType(), 'text/plain')
self.assertTrue(document.hasData())
def test_03_textFileWithExplicitExtensionWithoutContentTypefromUrl(self):
......@@ -134,9 +134,9 @@ class TestIngestion(ERP5TypeLiveTestCase):
script_id = 'ERP5Site_getTextFileWithoutContentType.txt'
document = self.contributeFileWithUrl(script_id)
self.tic()
self.assertEquals(document.getPortalType(), 'Text')
self.assertEquals(document.getFilename(), script_id)
self.assertEquals(document.getContentType(), 'text/plain')
self.assertEqual(document.getPortalType(), 'Text')
self.assertEqual(document.getFilename(), script_id)
self.assertEqual(document.getContentType(), 'text/plain')
self.assertTrue(document.hasData())
def test_04_contributeTextFileWithFilenameAndRedirectionfromUrl(self):
......@@ -147,9 +147,9 @@ class TestIngestion(ERP5TypeLiveTestCase):
filename = 'any_file.txt'
document = self.contributeFileWithUrl(script_id, filename=filename)
self.tic()
self.assertEquals(document.getPortalType(), 'Text')
self.assertEquals(document.getFilename(), filename)
self.assertEquals(document.getContentType(), 'text/plain')
self.assertEqual(document.getPortalType(), 'Text')
self.assertEqual(document.getFilename(), filename)
self.assertEqual(document.getContentType(), 'text/plain')
self.assertTrue(document.hasData())
def test_05_contributeTextFileWithoutFilenameButHTMLContentType(self):
......@@ -160,8 +160,8 @@ class TestIngestion(ERP5TypeLiveTestCase):
script_id = 'ERP5Site_getTextFileWithoutFileNameButHTMLContentType'
document = self.contributeFileWithUrl(script_id)
self.tic()
self.assertEquals(document.getPortalType(), 'Web Page')
self.assertEquals(document.getFilename(), script_id)
self.assertEquals(document.getContentType(), 'text/html')
self.assertEqual(document.getPortalType(), 'Web Page')
self.assertEqual(document.getFilename(), script_id)
self.assertEqual(document.getContentType(), 'text/html')
self.assertTrue(document.hasData())
151
\ No newline at end of file
152
\ No newline at end of file
......@@ -84,7 +84,7 @@ business=<tal:block tal:replace='here/service_username'/>
}
try:
result = self.service.navigate(page_template=pt_id, paypal_dict=paypal_dict)
self.assertEquals(result, """key=return value=http://ipn/
self.assertEqual(result, """key=return value=http://ipn/
link=http://paypal/
business=business@sample.com""")
finally:
......
10
\ No newline at end of file
11
\ No newline at end of file
......@@ -87,8 +87,8 @@ class TestResearchItemSummaryReport(TestTaskReportingMixin):
def getDataResult(result):
data_list = []
column_id_list = [x[0] for x in result.column_list]
self.assertEquals(column_id_list[0], "source_title")
self.assertEquals(column_id_list[-1], "total")
self.assertEqual(column_id_list[0], "source_title")
self.assertEqual(column_id_list[-1], "total")
column_id_list.pop(0)
column_id_list.pop(-1)
column_id_list.sort()
......@@ -108,7 +108,7 @@ class TestResearchItemSummaryReport(TestTaskReportingMixin):
at_date = DateTime("2014/01/01")
result = callReport()
# Initially we should have only one line for an empty total
self.assertEquals((["Worker", "Total"],
self.assertEqual((["Worker", "Total"],
[["Total", None]]),
getDataResult(result))
......@@ -119,7 +119,7 @@ class TestResearchItemSummaryReport(TestTaskReportingMixin):
source='person_module/Person_1',
)
result = callReport()
self.assertEquals((["Worker", "undefined", "Total"],
self.assertEqual((["Worker", "undefined", "Total"],
[["Person_1", 3, 3],
["Total", 3, 3]]),
getDataResult(result))
......@@ -132,7 +132,7 @@ class TestResearchItemSummaryReport(TestTaskReportingMixin):
line_aggregate_relative_url='research_item_module/Item_1',
)
result = callReport()
self.assertEquals((["Worker", "undefined", "Item_1", "Total"],
self.assertEqual((["Worker", "undefined", "Item_1", "Total"],
[["Person_1", 3, None, 3],
["Person_2", None, 5.2, 5.2],
["Total", 3, 5.2, 8.2]]),
......@@ -158,7 +158,7 @@ class TestResearchItemSummaryReport(TestTaskReportingMixin):
line_aggregate_relative_url='research_item_module/Item_2',
)
result = callReport()
self.assertEquals((["Worker", "undefined", "Item_1", "Item_2", "Total"],
self.assertEqual((["Worker", "undefined", "Item_1", "Item_2", "Total"],
[["Person_1", 3, None, 1.7, 4.7],
["Person_2", None, 7.6, 0.9, 8.5],
["Total", 3, 7.6, 2.6, 13.2]]),
......
8
\ No newline at end of file
9
\ No newline at end of file
......@@ -88,7 +88,7 @@ class TestRunMyDoc(ERP5TypeTestCase):
document = website.WebSection_getDocumentValue(test_page_reference)
self.assertNotEquals(None, document)
self.assertEquals(document.getRelativeUrl(),
self.assertEqual(document.getRelativeUrl(),
test_page.getRelativeUrl())
def test_Zuite_uploadScreenShot(self):
......@@ -127,15 +127,15 @@ class TestRunMyDoc(ERP5TypeTestCase):
self.assertNotEquals(None,
self.portal.Zuite_uploadScreenshot(image_upload, web_page_reference))
self.assertEquals(None,
self.assertEqual(None,
self.portal.Zuite_uploadScreenshot(image_upload, image_reference))
self.tic()
# The right image were updated.
image_upload.seek(0)
self.assertEquals(image_page_2.getData(), image_upload.read().decode("base64"))
self.assertEquals(image_page_2.getFilename(), image_reference + '.png')
self.assertEquals(image_page.getData(), '')
self.assertEqual(image_page_2.getData(), image_upload.read().decode("base64"))
self.assertEqual(image_page_2.getFilename(), image_reference + '.png')
self.assertEqual(image_page.getData(), '')
def test_viewSeleniumTest(self):
"""
......@@ -226,7 +226,7 @@ class TestRunMyDoc(ERP5TypeTestCase):
test_page = self.portal.test_page_module.newContent(title="TEST",
reference='TESTPAGEREFERENCE',
text_content=test_page_html)
self.assertEquals(test_page.TestPage_viewSeleniumTest(), expected_test_html %
self.assertEqual(test_page.TestPage_viewSeleniumTest(), expected_test_html %
("ERP5TypeTestCase", ""))
self.tic()
......@@ -240,7 +240,7 @@ class TestRunMyDoc(ERP5TypeTestCase):
expected_html = expected_test_html % ("ERP5TypeTestCase", "")
self.assertEquals(zptest._text, expected_html.strip())
self.assertEqual(zptest._text, expected_html.strip())
expected_test_html = u"""<html>
<head>
......@@ -301,7 +301,7 @@ class TestRunMyDoc(ERP5TypeTestCase):
self.portal.REQUEST['user'] = "toto"
self.portal.REQUEST['password'] = "toto"
self.assertEquals(test_page.TestPage_viewSeleniumTest(REQUEST=self.portal.REQUEST),
self.assertEqual(test_page.TestPage_viewSeleniumTest(REQUEST=self.portal.REQUEST),
expected_test_html % ("http://toto.com", "toto", "toto"))
self.tic()
test_page.TestPage_runSeleniumTest()
......@@ -314,4 +314,4 @@ class TestRunMyDoc(ERP5TypeTestCase):
expected_html = expected_test_html % ("http://toto.com", "toto", "toto")
self.assertEquals(zptest._text, expected_html.strip())
self.assertEqual(zptest._text, expected_html.strip())
69
\ No newline at end of file
70
\ No newline at end of file
......@@ -99,20 +99,20 @@ class TestSafeImage(ERP5TypeTestCase):
self.tic()
self.assertNotEqual(tile,None)
image_property = getattr(tile, "ImageProperties.xml", None)
self.assertEquals(image_property.getData(),
self.assertEqual(image_property.getData(),
"""<IMAGE_PROPERTIES WIDTH="660" HEIGHT="495" NUMTILES="9" NUMIMAGES="1" VERSION="1.8" TILESIZE="256" />""")
self.assertNotEqual(image_property, None)
self.assertEquals("Embedded File", image_property.getPortalType())
self.assertEqual("Embedded File", image_property.getPortalType())
image_group = getattr(tile, "TileGroup0", None)
self.assertNotEquals(image_group, None)
self.assertEquals("Image Tile Group",image_group.getPortalType())
self.assertEqual("Image Tile Group",image_group.getPortalType())
splitted_image_list = image_group.objectValues(portal_type="Image")
self.assertEquals(set(['0-0-0','1-0-0','1-1-0','2-0-0','2-0-1','2-1-0','2-1-1','2-2-0','2-2-1']),
self.assertEqual(set(['0-0-0','1-0-0','1-1-0','2-0-0','2-0-1','2-1-0','2-1-1','2-2-0','2-2-1']),
set([x.getId() for x in splitted_image_list]))
for x in splitted_image_list:
self.assertTrue(x.hasData())
self.assertEquals(123,image_group['0-0-0'].getHeight())
self.assertEquals(165,image_group['0-0-0'].getWidth())
self.assertEqual(123,image_group['0-0-0'].getHeight())
self.assertEqual(165,image_group['0-0-0'].getWidth())
def test_03_CreateTileImageTransformed(self):
""""
......@@ -129,24 +129,24 @@ class TestSafeImage(ERP5TypeTestCase):
self.tic()
self.assertNotEqual(tile_transformed,None)
image_property = getattr(tile_transformed, "ImageProperties.xml", None)
self.assertEquals(image_property.getData(),
self.assertEqual(image_property.getData(),
"""<IMAGE_PROPERTIES WIDTH="660" HEIGHT="495" NUMTILES="9" NUMIMAGES="1" VERSION="1.8" TILESIZE="256" />""")
self.assertNotEqual(image_property, None)
self.assertEquals("Embedded File", image_property.getPortalType())
self.assertEqual("Embedded File", image_property.getPortalType())
image_transform = getattr(tile_transformed, "TransformFile.txt", None)
self.assertTrue(image_transform.getData().split()[1],'2-0-0')
self.assertNotEqual(image_transform, None)
self.assertEquals("Embedded File", image_transform.getPortalType())
self.assertEqual("Embedded File", image_transform.getPortalType())
image_group = getattr(tile_transformed, "TileGroup0", None)
self.assertNotEquals(image_group, None)
self.assertEquals("Image Tile Group",image_group.getPortalType())
self.assertEqual("Image Tile Group",image_group.getPortalType())
splitted_image_list = image_group.objectValues(portal_type="Image")
self.assertEquals(set(['0-0-0','1-0-0','1-1-0','2-0-0','2-0-1','2-1-0','2-1-1','2-2-0','2-2-1']),
self.assertEqual(set(['0-0-0','1-0-0','1-1-0','2-0-0','2-0-1','2-1-0','2-1-1','2-2-0','2-2-1']),
set([x.getId() for x in splitted_image_list]))
for x in splitted_image_list:
self.assertTrue(x.hasData())
self.assertEquals(123,image_group['0-0-0'].getHeight())
self.assertEquals(165,image_group['0-0-0'].getWidth())
self.assertEqual(123,image_group['0-0-0'].getHeight())
self.assertEqual(165,image_group['0-0-0'].getWidth())
if getattr(self.image_module,'testTileTransformed',None) is not None:
self.image_module.manage_delObjects(ids=['testTileTransformed'])
transaction.commit()
......
15
\ No newline at end of file
16
\ No newline at end of file
......@@ -57,18 +57,18 @@ class TestERP5SocialContracts(ERP5TypeTestCase):
self.tic()
def test_getChildCount(self):
self.assertEquals(0, self.person_1.Person_getChildCount())
self.assertEqual(0, self.person_1.Person_getChildCount())
self.person_2.setNaturalParentValue(self.person_1)
self.tic()
self.assertEquals(1, self.person_1.Person_getChildCount())
self.assertEqual(1, self.person_1.Person_getChildCount())
self.assertEquals(1, self.person_1.Person_getChildCount(max_age=1000))
self.assertEquals(0, self.person_1.Person_getChildCount(max_age=2))
self.assertEqual(1, self.person_1.Person_getChildCount(max_age=1000))
self.assertEqual(0, self.person_1.Person_getChildCount(max_age=2))
def test_SocialContract(self):
self.assertEquals(0, self.person_1.Person_getPartnerCount())
self.assertEqual(0, self.person_1.Person_getPartnerCount())
contract_1 = self.portal.social_contract_module.newContent(
portal_type='Social Contract',
social_contract_type='marriage',
......@@ -76,7 +76,7 @@ class TestERP5SocialContracts(ERP5TypeTestCase):
contract_1.setDestinationValueList((self.person_1, self.person_2))
contract_1.validate()
self.tic()
self.assertEquals(1, self.person_1.Person_getPartnerCount())
self.assertEqual(1, self.person_1.Person_getPartnerCount())
contract_2 = self.portal.social_contract_module.newContent(
portal_type='Social Contract',
......@@ -86,19 +86,19 @@ class TestERP5SocialContracts(ERP5TypeTestCase):
contract_2.validate()
self.tic()
self.assertEquals(2, self.person_1.Person_getPartnerCount())
self.assertEqual(2, self.person_1.Person_getPartnerCount())
# you can specify a date
self.assertEquals(1,
self.assertEqual(1,
self.person_1.Person_getPartnerCount(at_date=DateTime(3000, 1, 2)))
# you can restrict to some social contracts types only
self.assertEquals(1, self.person_1.Person_getPartnerCount(
self.assertEqual(1, self.person_1.Person_getPartnerCount(
valid_social_contract_type_list=('marriage', )))
# only validated social contracts are used
contract_1.invalidate()
self.assertEquals(1, self.person_1.Person_getPartnerCount())
self.assertEqual(1, self.person_1.Person_getPartnerCount())
def test_suite():
......
29
\ No newline at end of file
30
\ No newline at end of file
......@@ -92,11 +92,11 @@ class TestTaskDistribution(ERP5TypeTestCase):
def test_01_createTestNode(self):
test_node = self._createTestNode()[0]
self.assertEquals(test_node.getPortalType(), "Test Node")
self.assertEqual(test_node.getPortalType(), "Test Node")
def test_02_createTestSuite(self):
test_suite, = self._createTestSuite()
self.assertEquals(test_suite.getPortalType(), "Test Suite")
self.assertEqual(test_suite.getPortalType(), "Test Suite")
def _callOptimizeAlarm(self):
self.portal.portal_alarms.task_distributor_alarm_optimize.activeSense()
......@@ -105,14 +105,14 @@ class TestTaskDistribution(ERP5TypeTestCase):
def test_03_startTestSuiteWithOneTestNode(self):
config_list = json.loads(self.distributor.startTestSuite(
title="COMP32-Node1"))
self.assertEquals([], config_list)
self.assertEqual([], config_list)
self._createTestSuite(quantity=3)
self.tic()
self._callOptimizeAlarm()
config_list = json.loads(self.distributor.startTestSuite(
title="COMP32-Node1"))
self.assertEquals(3, len(config_list))
self.assertEquals(set(['B0','B1','B2']),
self.assertEqual(3, len(config_list))
self.assertEqual(set(['B0','B1','B2']),
set([x['test_suite'] for x in config_list]))
def test_04_startTestSuiteWithTwoTestNode(self):
......@@ -124,14 +124,14 @@ class TestTaskDistribution(ERP5TypeTestCase):
title="COMP32-Node1"))
config_list = json.loads(self.distributor.startTestSuite(
title="COMP32-Node2"))
self.assertEquals([], config_list)
self.assertEqual([], config_list)
self._createTestSuite(quantity=2)
self.tic()
self._callOptimizeAlarm()
def checkConfigListForTestNode(test_node_title):
config_list = json.loads(self.distributor.startTestSuite(
title=test_node_title))
self.assertEquals(1, len(config_list))
self.assertEqual(1, len(config_list))
return (test_node_title, set([x['test_suite'] for x in config_list]))
config1 = checkConfigListForTestNode("COMP32-Node1")
config2 = checkConfigListForTestNode("COMP32-Node2")
......@@ -164,26 +164,26 @@ class TestTaskDistribution(ERP5TypeTestCase):
We will check the method createTestResult of task distribution tool
"""
test_result_path, revision = self._createTestResult()
self.assertEquals("r0=a,r1=a", revision)
self.assertEqual("r0=a,r1=a", revision)
self.assertTrue(test_result_path.startswith("test_result_module/"))
# If we ask again with another revision, we should get with previous
# revision
next_test_result_path, next_revision = self._createTestResult(
revision="r0=a,r1=b", node_title="Node1")
self.assertEquals(revision, next_revision)
self.assertEquals(next_test_result_path, test_result_path)
self.assertEqual(revision, next_revision)
self.assertEqual(next_test_result_path, test_result_path)
# Check if test result object is well created
test_result = self.getPortalObject().unrestrictedTraverse(test_result_path)
self.assertEquals("Test Result", test_result.getPortalType())
self.assertEquals(0, len(test_result.objectValues(
self.assertEqual("Test Result", test_result.getPortalType())
self.assertEqual(0, len(test_result.objectValues(
portal_type="Test Result Line")))
# now check that if we pass list of test, new lines will be created
next_test_result_path, next_revision = self._createTestResult(
test_list=['testFoo', 'testBar'])
self.assertEquals(next_test_result_path, test_result_path)
self.assertEqual(next_test_result_path, test_result_path)
line_list = test_result.objectValues(portal_type="Test Result Line")
self.assertEquals(2, len(line_list))
self.assertEquals(set(['testFoo', 'testBar']), set([x.getTitle() for x
self.assertEqual(2, len(line_list))
self.assertEqual(set(['testFoo', 'testBar']), set([x.getTitle() for x
in line_list]))
def test_06_startStopUnitTest(self):
......@@ -197,7 +197,7 @@ class TestTaskDistribution(ERP5TypeTestCase):
next_line_url, next_test = self.tool.startUnitTest(test_result_path)
# first launch, we have no time optimisations, so tests are
# launched in the given order
self.assertEquals(['testFoo', 'testBar'], [test, next_test])
self.assertEqual(['testFoo', 'testBar'], [test, next_test])
status_dict = {}
self.tool.stopUnitTest(line_url, status_dict)
self.tool.stopUnitTest(next_line_url, status_dict)
......@@ -213,31 +213,31 @@ class TestTaskDistribution(ERP5TypeTestCase):
next_line.duration = line.duration + 1
# So if we launch another unit test, it will process first the
# one wich is the slowest
self.assertEquals("stopped", test_result.getSimulationState())
self.assertEqual("stopped", test_result.getSimulationState())
self.tic()
next_test_result_path, revision = self._createTestResult(
test_list=['testFoo', 'testBar'], revision="r0=a,r1=b")
self.assertNotEquals(next_test_result_path, test_result_path)
line_url, test = self.tool.startUnitTest(next_test_result_path)
next_line_url, next_test = self.tool.startUnitTest(next_test_result_path)
self.assertEquals(['testBar', 'testFoo'], [test, next_test])
self.assertEqual(['testBar', 'testFoo'], [test, next_test])
def test_07_reportTaskFailure(self):
test_result_path, revision = self._createTestResult(node_title="Node0")
test_result_path, revision = self._createTestResult(node_title="Node1")
test_result = self.getPortalObject().unrestrictedTraverse(test_result_path)
self.assertEquals("started", test_result.getSimulationState())
self.assertEqual("started", test_result.getSimulationState())
node_list = test_result.objectValues(portal_type="Test Result Node",
sort_on=[("title", "ascending")])
def checkNodeState(first_state, second_state):
self.assertEquals([("Node0", first_state), ("Node1", second_state)],
self.assertEqual([("Node0", first_state), ("Node1", second_state)],
[(x.getTitle(), x.getSimulationState()) for x in node_list])
checkNodeState("started", "started")
self.tool.reportTaskFailure(test_result_path, {}, "Node0")
self.assertEquals("started", test_result.getSimulationState())
self.assertEqual("started", test_result.getSimulationState())
checkNodeState("failed", "started")
self.tool.reportTaskFailure(test_result_path, {}, "Node1")
self.assertEquals("failed", test_result.getSimulationState())
self.assertEqual("failed", test_result.getSimulationState())
checkNodeState("failed", "failed")
def test_08_checkWeCanNotCreateTwoTestResultInParallel(self):
......@@ -250,7 +250,7 @@ class TestTaskDistribution(ERP5TypeTestCase):
node_title="Node0", tic=0)
next_test_result_path, revision = self._createTestResult(
node_title="Node1", tic=0)
self.assertEquals(test_result_path, next_test_result_path)
self.assertEqual(test_result_path, next_test_result_path)
def _checkCreateTestResultAndAllowRestart(self, tic=False):
test_result_path, revision = self._createTestResult(test_list=["testFoo"])
......@@ -260,8 +260,8 @@ class TestTaskDistribution(ERP5TypeTestCase):
if tic:
self.tic()
test_result = self.getPortalObject().unrestrictedTraverse(test_result_path)
self.assertEquals("stopped", test_result.getSimulationState())
self.assertEquals(None, self._createTestResult(test_list=["testFoo"]))
self.assertEqual("stopped", test_result.getSimulationState())
self.assertEqual(None, self._createTestResult(test_list=["testFoo"]))
next_test_result_path, next_revision = self._createTestResult(
test_list=["testFoo"], allow_restart=True)
self.assertTrue(next_test_result_path != test_result_path)
......@@ -290,7 +290,7 @@ class TestTaskDistribution(ERP5TypeTestCase):
self.tic()
self._callOptimizeAlarm()
for test_node, aggregate_list in args:
self.assertEquals(set(test_node.getAggregateList()),
self.assertEqual(set(test_node.getAggregateList()),
set(aggregate_list),
"incorrect aggregate for %r, got %r instead of %r" % \
(test_node.getTitle(), test_node.getAggregateList(), aggregate_list))
......@@ -458,14 +458,14 @@ class TestTaskDistribution(ERP5TypeTestCase):
def test_13_startTestSuiteWithOneTestNodeAndPerformanceDistributor(self):
config_list = json.loads(self.performance_distributor.startTestSuite(
title="COMP32-Node1"))
self.assertEquals([], config_list)
self.assertEqual([], config_list)
self._createTestSuite(quantity=2,
specialise_value=self.performance_distributor)
self.tic()
self._callOptimizeAlarm()
config_list = json.loads(self.performance_distributor.startTestSuite(
title="COMP32-Node1"))
self.assertEquals(2, len(config_list))
self.assertEquals(set(['test suite 1-COMP32-Node1',
self.assertEqual(2, len(config_list))
self.assertEqual(set(['test suite 1-COMP32-Node1',
'test suite 2-COMP32-Node1']),
set([x['test_suite_title'] for x in config_list]))
252
\ No newline at end of file
253
\ No newline at end of file
......@@ -92,26 +92,26 @@ class TestLiveUpgrader(ERP5TypeLiveTestCase):
'alarm_tool_configuration_list'
)
signature = self.portal.ERP5Site_getUpgraderSignature()
self.assertEquals(sorted(signature_key_list), sorted(signature.keys()))
self.assertEqual(sorted(signature_key_list), sorted(signature.keys()))
def test_StandardUpgraderSignature(self):
""" Test default behaviours provided by default ERP5Site_getUpgraderSignature
"""
signature = self.portal.ERP5Site_getUpgraderSignature()
# By default we do not recatalog the instance
self.assertEquals(signature['recatalog'], False)
self.assertEqual(signature['recatalog'], False)
# By default we do not upgrade manually the workflow
self.assertEquals(signature['workflow_chain_dict'], None)
self.assertEqual(signature['workflow_chain_dict'], None)
# By Default we do not upgrade Catalog Filters
self.assertEquals(signature['catalog_filter_dict'], None)
self.assertEqual(signature['catalog_filter_dict'], None)
# By Default there is no extra properties to set.
self.assertEquals(signature['erp5_site_property_dict'], {})
self.assertEqual(signature['erp5_site_property_dict'], {})
# Do not enable alarms by default
self.assertEquals(signature['alarm_tool_configuration_list'], ())
self.assertEqual(signature['alarm_tool_configuration_list'], ())
# By default we upgrade software, products, bt5 and so on.
self.assertTrue(signature['alarm_dict']["bt5_upgrader"])
......@@ -144,14 +144,14 @@ class TestLiveUpgrader(ERP5TypeLiveTestCase):
'ERP5Site_getUpgraderSignature', "item=None",
"return " + str(signature_code))
self.commit()
self.assertEquals(self.portal.ERP5Site_getUpgraderSignature(), signature_code)
self.assertEquals(self.portal.ERP5Site_upgradeObjectList(), [])
self.assertEqual(self.portal.ERP5Site_getUpgraderSignature(), signature_code)
self.assertEqual(self.portal.ERP5Site_upgradeObjectList(), [])
test_object = self.portal.portal_categories.newContent(id=self.upgrade_object_test_id,
portal_type="Base Category")
self.assertEquals(test_object.getValidationState(), 'embedded')
self.assertEqual(test_object.getValidationState(), 'embedded')
self.assertNotEquals(self.portal.ERP5Site_upgradeObjectList(), [])
self.assertNotEquals(self.portal.ERP5Site_upgradeObjectList(upgrade="1"), [])
self.assertEquals(test_object.getValidationState(), 'published')
self.assertEqual(test_object.getValidationState(), 'published')
def testUpgradeObjectClass(self):
"""
......@@ -169,9 +169,9 @@ class TestLiveUpgrader(ERP5TypeLiveTestCase):
'ERP5Site_getUpgraderSignature', "item=None",
"return " + str(signature_code))
self.commit()
self.assertEquals(self.portal.ERP5Site_getUpgraderSignature(), signature_code)
self.assertEqual(self.portal.ERP5Site_getUpgraderSignature(), signature_code)
# Nothing to upgrade
self.assertEquals(self.portal.ERP5Site_upgradeObjectClass(), [])
self.assertEqual(self.portal.ERP5Site_upgradeObjectClass(), [])
# Create one broken object
gadget = self.portal.portal_gadgets.newContent(portal_type="Gadget",
......@@ -189,10 +189,10 @@ class TestLiveUpgrader(ERP5TypeLiveTestCase):
self.commit()
self.assertNotEquals(self.portal.ERP5Site_upgradeObjectClass(), [])
self.assertEquals(self.portal.ERP5Site_upgradeObjectClass(upgrade=1),
self.assertEqual(self.portal.ERP5Site_upgradeObjectClass(upgrade=1),
[(gadget.getRelativeUrl(), 'ERP5 Gadget')])
self.tic()
self.assertEquals(self.portal.ERP5Site_upgradeObjectClass(), [])
self.assertEqual(self.portal.ERP5Site_upgradeObjectClass(), [])
def test_UpgradeGlobalPropertyList(self):
"""
......@@ -206,16 +206,16 @@ class TestLiveUpgrader(ERP5TypeLiveTestCase):
'ERP5Site_getUpgraderSignature', "item=None",
"return " + str(signature_code))
self.commit()
self.assertEquals(self.portal.ERP5Site_getUpgraderSignature(), signature_code)
self.assertEquals(self.portal.ERP5Site_upgradeGlobalPropertyList(),
self.assertEqual(self.portal.ERP5Site_getUpgraderSignature(), signature_code)
self.assertEqual(self.portal.ERP5Site_upgradeGlobalPropertyList(),
["Upgrade Required for Global Properties."])
self.assertEquals(["Upgrade Executed for Global Properties (erp5_site_global_id)."],
self.assertEqual(["Upgrade Executed for Global Properties (erp5_site_global_id)."],
self.portal.ERP5Site_upgradeGlobalPropertyList(upgrade=1))
self.tic()
self.assertEquals(self.portal.ERP5Site_upgradeGlobalPropertyList(), [])
self.assertEquals(getattr(self.portal, 'erp5_site_global_id', None),
self.assertEqual(self.portal.ERP5Site_upgradeGlobalPropertyList(), [])
self.assertEqual(getattr(self.portal, 'erp5_site_global_id', None),
self.upgrade_object_test_id)
def test_UpgradeWorkflowChain(self):
......@@ -230,23 +230,23 @@ class TestLiveUpgrader(ERP5TypeLiveTestCase):
"return " + str(signature_code))
self.commit()
self.assertEquals(self.portal.ERP5Site_upgradeWorkflowChain(), [])
self.assertEqual(self.portal.ERP5Site_upgradeWorkflowChain(), [])
original_person_chain = workflow_dict["chain_Person"]
# Modify installed workflow chain.
workflow_dict["chain_Person"] = ''
workflow_tool.manage_changeWorkflows(default_chain = '',
props = workflow_dict)
self.assertEquals(workflow_tool.getWorkflowChainDict()["chain_Person"],
self.assertEqual(workflow_tool.getWorkflowChainDict()["chain_Person"],
"")
self.assertEquals(self.portal.ERP5Site_upgradeWorkflowChain(),
self.assertEqual(self.portal.ERP5Site_upgradeWorkflowChain(),
["Upgrade Required for Workflow Chain."])
self.assertEquals(self.portal.ERP5Site_upgradeWorkflowChain(upgrade=1),
self.assertEqual(self.portal.ERP5Site_upgradeWorkflowChain(upgrade=1),
["Upgrade Executed for Workflow Chain."])
self.tic()
self.assertEquals(self.portal.ERP5Site_upgradeWorkflowChain(),[])
self.assertEquals(workflow_tool.getWorkflowChainDict()["chain_Person"],
self.assertEqual(self.portal.ERP5Site_upgradeWorkflowChain(),[])
self.assertEqual(workflow_tool.getWorkflowChainDict()["chain_Person"],
original_person_chain)
def test_RunVerificationScriptDontRaise(self):
......@@ -261,9 +261,9 @@ class TestLiveUpgrader(ERP5TypeLiveTestCase):
"return ['A']")
failure = self.portal.ERP5Site_runVerificationScript("ERP5Site_raise")
self.failUnless("Script ERP5Site_raise fail to run" in failure,
self.assertTrue("Script ERP5Site_raise fail to run" in failure,
"'Script ERP5Site_raise fail to run not' in %s" % failure)
self.assertEquals('ERP5Site_return : \n - A ',
self.assertEqual('ERP5Site_return : \n - A ',
self.portal.ERP5Site_runVerificationScript("ERP5Site_return"))
def test_UpgradePortalTypePropertySheet(self):
......@@ -275,13 +275,13 @@ class TestLiveUpgrader(ERP5TypeLiveTestCase):
'ERP5Site_getUpgraderSignature', "item=None",
"return " + str(signature_code))
self.commit()
self.assertEquals(self.portal.ERP5Site_getUpgraderSignature(), signature_code)
self.assertEquals(self.portal.ERP5Site_upgradePortalTypePropertySheet(),
self.assertEqual(self.portal.ERP5Site_getUpgraderSignature(), signature_code)
self.assertEqual(self.portal.ERP5Site_upgradePortalTypePropertySheet(),
["Person doesn't has Account associated."])
self.assertEquals(self.portal.ERP5Site_upgradePortalTypePropertySheet(upgrade=1),
self.assertEqual(self.portal.ERP5Site_upgradePortalTypePropertySheet(upgrade=1),
["Associate PropertySheet Account into Portal Type Person."])
self.tic()
self.assertEquals(self.portal.ERP5Site_upgradePortalTypePropertySheet(), [])
self.assertEqual(self.portal.ERP5Site_upgradePortalTypePropertySheet(), [])
def test_recreateActivities(self):
......@@ -306,5 +306,5 @@ class TestLiveUpgrader(ERP5TypeLiveTestCase):
self.tic()
self.assertFalse(object_to_test.hasActivity(method_id="ERP5Site_testRecreateActivityScript"))
self.assertFalse(self.portal.portal_activities.hasActivity(method_id='ERP5Site_clearActivities'))
self.assertEquals(object_to_test.getProperty('custom_property_without_meaning'),
self.assertEqual(object_to_test.getProperty('custom_property_without_meaning'),
'I was there')
600
\ No newline at end of file
601
\ No newline at end of file
......@@ -90,11 +90,11 @@ class TestShaCache(ShaCacheMixin, ERP5TypeTestCase):
document = self.portal.portal_catalog.getResultValue(reference=self.key)
self.assertNotEqual(None, document)
self.assertEquals(self.key, document.getTitle())
self.assertEquals(self.key, document.getReference())
self.assertEquals(self.data, document.getData())
self.assertEquals('application/octet-stream', document.getContentType())
self.assertEquals('Published', document.getValidationStateTitle())
self.assertEqual(self.key, document.getTitle())
self.assertEqual(self.key, document.getReference())
self.assertEqual(self.data, document.getData())
self.assertEqual('application/octet-stream', document.getContentType())
self.assertEqual('Published', document.getValidationStateTitle())
def test_get_file(self):
"""
......@@ -111,7 +111,7 @@ class TestShaCache(ShaCacheMixin, ERP5TypeTestCase):
result, data = self.getFile()
self.assertEqual(result, httplib.OK)
self.assertEquals(data, self.data)
self.assertEqual(data, self.data)
def test_put_file_twice(self):
"""
......@@ -120,17 +120,17 @@ class TestShaCache(ShaCacheMixin, ERP5TypeTestCase):
self.postFile()
self.tic()
document = self.portal.portal_catalog.getResultValue(reference=self.key)
self.assertEquals('published', document.getValidationState())
self.assertEqual('published', document.getValidationState())
self.postFile()
self.tic()
self.assertEquals(2, self.portal.portal_catalog.countResults(
self.assertEqual(2, self.portal.portal_catalog.countResults(
reference=self.key)[0][0])
document2 = self.portal.portal_catalog.getResultValue(reference=self.key,
sort_on=(('uid', 'ASC'),))
self.assertEquals('published', document2.getValidationState())
self.assertEquals('archived', document.getValidationState())
self.assertEqual('published', document2.getValidationState())
self.assertEqual('archived', document.getValidationState())
def test_put_file_twice_no_tic(self):
self.postFile()
......
69
\ No newline at end of file
70
\ No newline at end of file
......@@ -101,20 +101,20 @@ class TestShaDir(ShaDirMixin, ERP5TypeTestCase):
# Asserting Data Set
data_set = self.portal.portal_catalog.getResultValue(
reference=self.key)
self.assertEquals(self.key, data_set.getReference())
self.assertEquals('published', data_set.getValidationState())
self.assertEqual(self.key, data_set.getReference())
self.assertEqual('published', data_set.getValidationState())
# Asserting Document
document = self.portal.portal_catalog.getResultValue(
reference=self.sha512sum)
self.assertEquals(self.sha512sum, document.getTitle())
self.assertEquals(self.sha512sum, document.getReference())
self.assertEquals(self.data, document.getData())
self.assertEquals(data_set, document.getFollowUpValue())
self.assertEquals(str(self.expiration_date),
self.assertEqual(self.sha512sum, document.getTitle())
self.assertEqual(self.sha512sum, document.getReference())
self.assertEqual(self.data, document.getData())
self.assertEqual(data_set, document.getFollowUpValue())
self.assertEqual(str(self.expiration_date),
str(document.getExpirationDate()))
self.assertEquals('application/json', document.getContentType())
self.assertEquals('Published', document.getValidationStateTitle())
self.assertEqual('application/json', document.getContentType())
self.assertEqual('Published', document.getValidationStateTitle())
def test_get_information(self):
"""
......@@ -129,8 +129,8 @@ class TestShaDir(ShaDirMixin, ERP5TypeTestCase):
information_list = json.loads(data)
self.assertEquals(1, len(information_list))
self.assertEquals(json.dumps(information_list[0]), self.data)
self.assertEqual(1, len(information_list))
self.assertEqual(json.dumps(information_list[0]), self.data)
def test_post_information_more_than_once(self):
"""
......@@ -160,8 +160,8 @@ class TestShaDir(ShaDirMixin, ERP5TypeTestCase):
self.assertEqual(result, httplib.OK)
information_list = json.loads(data)
self.assertEquals(1, len(information_list))
self.assertEquals(json.dumps(information_list[0]), self.data)
self.assertEqual(1, len(information_list))
self.assertEqual(json.dumps(information_list[0]), self.data)
def test_post_information_more_than_once_no_tic(self):
"""
......@@ -198,8 +198,8 @@ class TestShaDir(ShaDirMixin, ERP5TypeTestCase):
self.assertEqual(result, httplib.OK)
information_list = json.loads(data)
self.assertEquals(1, len(information_list))
self.assertEquals(json.dumps(information_list[0]), self.data)
self.assertEqual(1, len(information_list))
self.assertEqual(json.dumps(information_list[0]), self.data)
def test_get_information_from_different_data_set(self):
"""
......@@ -229,19 +229,19 @@ class TestShaDir(ShaDirMixin, ERP5TypeTestCase):
self.postInformation(key_2, data_2)
self.tic()
self.assertEquals(2, len(self.portal.data_set_module))
self.assertEquals(2, len(self.portal.document_module))
self.assertEqual(2, len(self.portal.data_set_module))
self.assertEqual(2, len(self.portal.document_module))
result, document = self.getInformation()
self.assertEquals(1, len(json.loads(document)))
self.assertEqual(1, len(json.loads(document)))
result, document2 = self.getInformation(key_2)
self.assertEquals(1, len(json.loads(document2)))
self.assertEqual(1, len(json.loads(document2)))
self.postInformation()
self.tic()
self.assertEquals(2, len(self.portal.data_set_module))
self.assertEquals(3, len(self.portal.document_module))
self.assertEqual(2, len(self.portal.data_set_module))
self.assertEqual(3, len(self.portal.document_module))
result, document3 = self.getInformation()
self.assertEquals(1, len(json.loads(document3)))
self.assertEqual(1, len(json.loads(document3)))
76
\ No newline at end of file
77
\ No newline at end of file
......@@ -66,13 +66,13 @@ class TestUNGSecurity(ERP5TypeTestCase):
to create and edit document in UNG"""
self.login("ung_user")
web_page = self.portal.portal_catalog.getResultValue(portal_type="Web Page")
self.assertEquals(web_page, None)
self.assertEqual(web_page, None)
self.changeSkin("UNGDoc")
self.portal.ERP5Site_createNewWebDocument("web_page_template")
self.tic()
web_page = self.portal.portal_catalog.getResultValue(portal_type="Web Page")
self.assertEquals(web_page.getReference(), "default-Web.Page.Reference")
self.assertEquals(len(self.portal.web_page_module.searchFolder()), 1)
self.assertEqual(web_page.getReference(), "default-Web.Page.Reference")
self.assertEqual(len(self.portal.web_page_module.searchFolder()), 1)
def testShareDocument(self):
"""Test the document sharing between erp5 users"""
......@@ -91,28 +91,28 @@ class TestUNGSecurity(ERP5TypeTestCase):
web_table.setReference("share-Web.Table")
self.tic()
self.login("ung_user2")
self.assertEquals(len(self.portal.web_page_module.searchFolder()), 0)
self.assertEqual(len(self.portal.web_page_module.searchFolder()), 0)
ung_web_site = self.portal.web_site_module.ung
self.changeSkin("UNGDoc")
web_table = ung_web_site.ERP5Site_userFollowUpWebPage("share-Web.Table")
self.tic()
self.assertNotEquals(web_table.getFollowUpList(), [])
self.assertEquals(len(self.portal.web_page_module.searchFolder()), 1)
self.assertEqual(len(self.portal.web_page_module.searchFolder()), 1)
web_table = self.portal.web_page_module.searchFolder()[0]
self.assertEquals(web_table.getPortalType(), "Web Table")
self.assertEqual(web_table.getPortalType(), "Web Table")
self.login("ERP5TypeTestCase")
self.assertEquals(web_table.getFollowUpValue().getFirstName(), "Gabriel")
self.assertEqual(web_table.getFollowUpValue().getFirstName(), "Gabriel")
def testBase_updateCalendarEventListWithERP5User(self):
""" Test script Base_updateCalendarEventList with erp5 user"""
self.logout()
self.changeSkin("UNGDoc")
self.assertEquals('{"events": []}',
self.assertEqual('{"events": []}',
self.portal.Base_updateCalendarEventList("list"))
self.login("ung_user")
self.changeSkin("UNGDoc")
event_list = json.loads(self.portal.Base_updateCalendarEventList("list"))
self.assertEquals(event_list.get("events"), [])
self.assertEqual(event_list.get("events"), [])
event = self.portal.event_module.newContent(portal_type="Note")
event.setStartDate(DateTime())
event.setStopDate(DateTime()+1)
......@@ -120,7 +120,7 @@ class TestUNGSecurity(ERP5TypeTestCase):
self.changeSkin("UNGDoc")
event_dict = json.loads(self.portal.Base_updateCalendarEventList("list"))
event_list = event_dict.get("events")
self.assertEquals(event_list[0][-2], "Note")
self.assertEqual(event_list[0][-2], "Note")
form_dict = dict(CalendarStartTime=DateTime().strftime("%m/%d/%Y %H:%M"),
CalendarEndTime=DateTime().strftime("%m/%d/%Y %H:%M"),
CalendarTitle="One Sample",
......@@ -130,7 +130,7 @@ class TestUNGSecurity(ERP5TypeTestCase):
self.portal.Base_updateCalendarEventList("add")
self.tic()
web_message = self.portal.portal_catalog.getResultValue(portal_type="Web Message")
self.assertEquals(web_message.getTitle(), "One Sample")
self.assertEqual(web_message.getTitle(), "One Sample")
self.portal.REQUEST.form.clear()
form_dict = dict(CalendarStartTime=DateTime().strftime("%m/%d/%Y %H:%M"),
CalendarEndTime=DateTime().strftime("%m/%d/%Y %H:%M"),
......@@ -140,7 +140,7 @@ class TestUNGSecurity(ERP5TypeTestCase):
self.changeSkin("UNGDoc")
self.portal.Base_updateCalendarEventList("update")
self.tic()
self.assertEquals(web_message.getTitle(), "Buy Coffee")
self.assertEqual(web_message.getTitle(), "Buy Coffee")
self.portal.REQUEST.form.clear()
form_dict = dict(title=web_message.getTitle(),
id=web_message.getId())
......@@ -149,7 +149,7 @@ class TestUNGSecurity(ERP5TypeTestCase):
self.portal.Base_updateCalendarEventList("remove")
self.tic()
web_message = self.portal.portal_catalog.getResultValue(portal_type="Web Message")
self.assertEquals(web_message, None)
self.assertEqual(web_message, None)
def testERPSite_createUNGUser(self):
"""Test if is possible create one user as Anonymous user"""
......@@ -163,8 +163,8 @@ class TestUNGSecurity(ERP5TypeTestCase):
self.tic()
self.login("ERP5TypeTestCase")
person = self.portal.portal_catalog.getResultValue(portal_type="Person")
self.assertEquals(person.getLastName(), "My Last Name")
self.assertEquals(person.getValidationState(), "validated")
self.assertEqual(person.getLastName(), "My Last Name")
self.assertEqual(person.getValidationState(), "validated")
def testBase_getPreferencePathList(self):
"""Test if with normal user the paths of preference objects are returned correctly"""
......@@ -177,11 +177,11 @@ class TestUNGSecurity(ERP5TypeTestCase):
self.login("ung_user")
self.changeSkin("UNGDoc")
preference_dict = json.loads(self.portal.Base_getPreferencePathList())
self.assertEquals(preference_dict, {u'preference': u'portal_preferences/1'})
self.assertEqual(preference_dict, {u'preference': u'portal_preferences/1'})
self.login("ung_user2")
self.changeSkin("UNGDoc")
preference_dict = json.loads(self.portal.Base_getPreferencePathList())
self.assertEquals(preference_dict, {u'preference': u'portal_preferences/2'})
self.assertEqual(preference_dict, {u'preference': u'portal_preferences/2'})
def testWebPage_shareDocument(self):
""" """
......@@ -190,11 +190,11 @@ class TestUNGSecurity(ERP5TypeTestCase):
self.portal.ERP5Site_createNewWebDocument("web_page_template")
self.tic()
web_page = self.portal.portal_catalog.getResultValue(portal_type="Web Page")
self.assertEquals(web_page.getValidationState(), "draft")
self.assertEqual(web_page.getValidationState(), "draft")
self.changeSkin("UNGDoc")
response = web_page.WebPage_shareDocument()
self.tic()
self.assertEquals(response, "".join((self.portal.absolute_url(),
self.assertEqual(response, "".join((self.portal.absolute_url(),
"/?key=",
web_page.getReference())))
self.assertEquals(web_page.getValidationState(), "shared")
self.assertEqual(web_page.getValidationState(), "shared")
37
\ No newline at end of file
38
\ No newline at end of file
416
\ No newline at end of file
417
\ No newline at end of file
......@@ -82,18 +82,18 @@ class TestShaCacheExternal(ShaCacheMixin, ShaSecurityMixin, ERP5TypeTestCase):
data = result.read()
finally:
connection.close()
self.assertEquals(self.key, data)
self.assertEquals(httplib.CREATED, result.status)
self.assertEqual(self.key, data)
self.assertEqual(httplib.CREATED, result.status)
# Check Document
document = self.portal.portal_catalog.getResultValue(portal_type='File',
reference=self.key,
creation_date=' >= "%s"' % now)
self.assertNotEquals(None, document)
self.assertEquals(self.data, document.getData())
self.assertEquals('File', document.getPortalType())
self.assertEquals('Published', document.getValidationStateTitle())
self.assertEquals(self.expected_content_type, document.getContentType())
self.assertEqual(self.data, document.getData())
self.assertEqual('File', document.getPortalType())
self.assertEqual('Published', document.getValidationStateTitle())
self.assertEqual(self.expected_content_type, document.getContentType())
def test_external_get(self, annonymous=False):
"""
......@@ -112,9 +112,9 @@ class TestShaCacheExternal(ShaCacheMixin, ShaSecurityMixin, ERP5TypeTestCase):
data = result.read()
finally:
connection.close()
self.assertEquals(self.data, data)
self.assertEquals(httplib.OK, result.status)
self.assertEquals(self.expected_content_type,
self.assertEqual(self.data, data)
self.assertEqual(httplib.OK, result.status)
self.assertEqual(self.expected_content_type,
result.getheader("content-type"))
def test_external_get_anonymous(self):
......@@ -141,6 +141,6 @@ class TestShaCacheExternal(ShaCacheMixin, ShaSecurityMixin, ERP5TypeTestCase):
# to POST resource while begin not authorised
# One of UNAUTHORIZED or FORBIDDEN shall be returned
# Ref: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4
# self.assertEquals(httplib.UNAUTHORIZED, result.status)
# self.assertEqual(httplib.UNAUTHORIZED, result.status)
# FORBIDDEN seems more suitable for RESTful server...
self.assertEquals(httplib.FORBIDDEN, result.status)
self.assertEqual(httplib.FORBIDDEN, result.status)
......@@ -141,7 +141,7 @@ class TestShaCacheSecurity(ShaCacheMixin, ShaSecurityMixin, SecurityTestCase):
document.publishAlive()
self.tic()
self.assertEquals('Published Alive',
self.assertEqual('Published Alive',
document.getValidationStateTitle())
self.assertUserHaveRoleOnDocument(self.lucas_user, 'Auditor', document)
......
......@@ -83,27 +83,27 @@ class TestShaDirExternal(ShaDirMixin, ShaSecurityMixin, ERP5TypeTestCase):
data = result.read()
finally:
connection.close()
self.assertEquals('', data)
self.assertEquals(201, result.status)
self.assertEqual('', data)
self.assertEqual(201, result.status)
# Check Data Set
data_set = self.portal.portal_catalog.getResultValue(
portal_type='Data Set',
reference=self.key)
self.assertNotEquals(None, data_set)
self.assertEquals('Published', data_set.getValidationStateTitle())
self.assertEqual('Published', data_set.getValidationStateTitle())
# Check Document
document = self.portal.portal_catalog.getResultValue(portal_type='File',
reference=self.sha512sum,
creation_date=' >= "%s"' % now)
self.assertNotEquals(None, document)
self.assertEquals(self.data, document.getData())
self.assertEquals(str(self.expiration_date),
self.assertEqual(self.data, document.getData())
self.assertEqual(str(self.expiration_date),
str(document.getExpirationDate()))
self.assertEquals(data_set, document.getFollowUpValue())
self.assertEquals('File', document.getPortalType())
self.assertEquals('Published', document.getValidationStateTitle())
self.assertEqual(data_set, document.getFollowUpValue())
self.assertEqual('File', document.getPortalType())
self.assertEqual('Published', document.getValidationStateTitle())
def test_external_get(self, annonymous=False):
"""
......@@ -121,9 +121,9 @@ class TestShaDirExternal(ShaDirMixin, ShaSecurityMixin, ERP5TypeTestCase):
data = result.read()
finally:
connection.close()
self.assertEquals(json.dumps([json.loads(self.data)]), data)
self.assertEquals(200, result.status)
self.assertEquals(self.content_type, result.getheader("content-type"))
self.assertEqual(json.dumps([json.loads(self.data)]), data)
self.assertEqual(200, result.status)
self.assertEqual(self.content_type, result.getheader("content-type"))
def test_external_get_anonymous(self):
"""
......@@ -143,7 +143,7 @@ class TestShaDirExternal(ShaDirMixin, ShaSecurityMixin, ERP5TypeTestCase):
self.tic()
finally:
connection.close()
self.assertEquals(302, result.status)
self.assertEqual(302, result.status)
def test_external_post_with_wrong_data(self):
"""
......@@ -166,6 +166,6 @@ class TestShaDirExternal(ShaDirMixin, ShaSecurityMixin, ERP5TypeTestCase):
finally:
connection.close()
self.assertTrue("Required field 'file' is missing" in data, data)
self.assertEquals(500, result.status)
self.assertEquals('text/html; charset=utf-8',
self.assertEqual(500, result.status)
self.assertEqual('text/html; charset=utf-8',
result.getheader("content-type"))
......@@ -122,7 +122,7 @@ class TestShaDirSecurity(ShaDirMixin, ShaSecurityMixin, SecurityTestCase):
data_set.publish()
self.tic()
self.assertEquals('Published', data_set.getValidationStateTitle())
self.assertEqual('Published', data_set.getValidationStateTitle())
self.assertUserHaveRoleOnDocument(self.lucas_user, 'Auditor', data_set)
......@@ -170,7 +170,7 @@ class TestShaDirSecurity(ShaDirMixin, ShaSecurityMixin, SecurityTestCase):
document.publishAlive()
self.tic()
self.assertEquals('Published Alive', document.getValidationStateTitle())
self.assertEqual('Published Alive', document.getValidationStateTitle())
self.assertUserHaveRoleOnDocument(self.lucas_user, 'Auditor', document)
def test_user_can_not_view_document_module(self):
......
32
\ No newline at end of file
33
\ No newline at end of file
......@@ -83,7 +83,7 @@ class TestAccessTab(ERP5TypeTestCase):
'renderer': 'ERP5Site_renderViewActionList',
'id': 'browse_tab',
'icon': 'tab_icon/list.png'}
self.assertEquals(tab_info, expected_tab_info)
self.assertEqual(tab_info, expected_tab_info)
def checkStatusDict(self):
""" Check a script which is used in access tab view """
......@@ -91,7 +91,7 @@ class TestAccessTab(ERP5TypeTestCase):
expected_status_dict = {'express_mode': 'support_disabled',
'dms_mode': False,
'basic_mode': True}
self.assertEquals(status_dict, expected_status_dict)
self.assertEqual(status_dict, expected_status_dict)
def checkInformationDictBasic(self):
""" Check a script which is used in the main part in access tab view """
......@@ -99,25 +99,25 @@ class TestAccessTab(ERP5TypeTestCase):
info_dict = portal.ERP5Site_getCategorizedModuleActionInformationDict()
view_list = info_dict['view']
self.assertEquals(len(view_list), 1)
self.assertEquals(len(view_list[0]), 2)
self.assertEqual(len(view_list), 1)
self.assertEqual(len(view_list[0]), 2)
base = view_list[0]
(label, menu_list) = base
self.assertEquals(label, 'base')
self.assertEquals(len(menu_list), 2)
self.assertEqual(label, 'base')
self.assertEqual(len(menu_list), 2)
organisation_menu = menu_list[0]
person_menu = menu_list[1]
self.assertEquals(len(organisation_menu), 2)
self.assertEquals(type(organisation_menu), tuple)
self.assertEquals(len(person_menu), 2)
self.assertEquals(type(person_menu), tuple)
self.assertEqual(len(organisation_menu), 2)
self.assertEqual(type(organisation_menu), tuple)
self.assertEqual(len(person_menu), 2)
self.assertEqual(type(person_menu), tuple)
(organisation_label, organisation_url) = organisation_menu
(person_label, person_url) = person_menu
self.assertEquals(organisation_label, 'Organisations')
self.assertEquals(person_label, 'Persons')
self.assertEqual(organisation_label, 'Organisations')
self.assertEqual(person_label, 'Persons')
def addCurrencyModuleIntoAccessTab(self):
""" add currency module into access tab page so that we can
......@@ -137,19 +137,19 @@ class TestAccessTab(ERP5TypeTestCase):
# different when the view is cached.
info_dict = portal.ERP5Site_getCategorizedModuleActionInformationDict()
view_list = info_dict['view']
self.assertEquals(len(view_list), 1)
self.assertEquals(len(view_list[0]), 2)
self.assertEqual(len(view_list), 1)
self.assertEqual(len(view_list[0]), 2)
base = view_list[0]
(label, menu_list) = base
self.assertEquals(len(menu_list), 3)
self.assertEqual(len(menu_list), 3)
currency_menu = menu_list[0]
self.assertEquals(len(currency_menu), 2)
self.assertEquals(type(currency_menu), tuple)
self.assertEqual(len(currency_menu), 2)
self.assertEqual(type(currency_menu), tuple)
(currency_label, currency_url) = currency_menu
self.assertEquals(currency_label, 'Currencies')
self.assertEqual(currency_label, 'Currencies')
self.assertTrue('https' in currency_url[0][1])
def test_01_testAccessTab(self):
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -133,9 +133,9 @@ class TestAccounting_l10n_M9(ERP5TypeTestCase):
def test_AccountingPlanInstallation(self):
"""Tests that the accounting plan is well installed."""
self.failUnless('m9' in self.category_tool.gap.fr.objectIds())
self.assertTrue('m9' in self.category_tool.gap.fr.objectIds())
self.assertNotEquals(0, len(self.category_tool.gap.fr.m9.objectIds()))
self.failUnless('gap/fr/m9' in [x[1] for x in
self.assertTrue('gap/fr/m9' in [x[1] for x in
self.portal.account_module.AccountModule_getAvailableGapList()])
def test_SimpleTransmissionSheet(self):
......@@ -146,14 +146,14 @@ class TestAccounting_l10n_M9(ERP5TypeTestCase):
transmission_sheet_module = self.getInvoiceTransmissionSheetModule()
transmission_sheet = transmission_sheet_module.newContent(
portal_type=self.invoice_transmission_sheet_portal_type)
self.assertEquals(transmission_sheet.getValidationState(), 'draft')
self.assertEqual(transmission_sheet.getValidationState(), 'draft')
# add an invoice to the transamission sheet
invoice.setAggregateValue(transmission_sheet)
invoice.recursiveImmediateReindexObject()
self.getWorkflowTool().doActionFor(
transmission_sheet,
'emit_action')
self.assertEquals(transmission_sheet.getValidationState(),
self.assertEqual(transmission_sheet.getValidationState(),
'new')
def test_TransmissionSheetEmitRefusedIfNoInvoice(self):
......@@ -162,49 +162,49 @@ class TestAccounting_l10n_M9(ERP5TypeTestCase):
transmission_sheet_module = self.getInvoiceTransmissionSheetModule()
transmission_sheet = transmission_sheet_module.newContent(
portal_type=self.invoice_transmission_sheet_portal_type)
self.assertEquals(transmission_sheet.getValidationState(), 'draft')
self.assertEqual(transmission_sheet.getValidationState(), 'draft')
self.assertRaises(ValidationFailed, self.getWorkflowTool().doActionFor,
transmission_sheet, 'emit_action')
def checkAccountTypeConsistency(self, account, fixit=1):
self.assertEquals(1, len([x for x in account.checkConsistency(fixit=1)
self.assertEqual(1, len([x for x in account.checkConsistency(fixit=1)
if x.class_name.find('Account Type Constraint')>=0]))
def test_AccountTypeConstaintForExpense(self):
account = self._getAccount('account',
gap='fr/m9/6/60/602/6022/60225',
account_type='expense')
self.assertEquals([], account.checkConsistency())
self.assertEqual([], account.checkConsistency())
def test_AccountTypeConstaintFixForExpense(self):
account = self._getAccount('account',
gap='fr/m9/6/60/602/6022/60225',
account_type='equity')
self.checkAccountTypeConsistency(account)
self.assertEquals('expense', account.getAccountType())
self.assertEqual('expense', account.getAccountType())
def test_AccountTypeConstaintForPayable(self):
account = self._getAccount('payable_account',
gap='fr/m9/4/40',
account_type='liability/payable')
self.assertEquals([], account.checkConsistency())
self.assertEqual([], account.checkConsistency())
def test_AccountTypeConstaintFixForPayable(self):
account = self._getAccount('payable_account',
gap='fr/m9/4/40',
account_type='equity')
self.checkAccountTypeConsistency(account)
self.assertEquals('liability/payable', account.getAccountType())
self.assertEqual('liability/payable', account.getAccountType())
def test_AccountTypeConstaintForClass4(self):
# members of class 4 can be payable or receivable
account = self._getAccount('class4_account',
gap='fr/m9/4/44',
account_type='liability/payable')
self.assertEquals([], account.checkConsistency())
self.assertEqual([], account.checkConsistency())
account.edit(account_type='asset/receivable')
self.assertEquals([], account.checkConsistency())
self.assertEqual([], account.checkConsistency())
def test_AccountTypeConstaintFixForClass4(self):
# members of class 4 can be payable or receivable
......@@ -212,7 +212,7 @@ class TestAccounting_l10n_M9(ERP5TypeTestCase):
gap='fr/m9/4/44',
account_type='equity')
self.checkAccountTypeConsistency(account)
self.failUnless(account.getAccountType() in ('liability/payable',
self.assertTrue(account.getAccountType() in ('liability/payable',
'asset/receivable'))
# Members of gap/fr/m9/4/47 are very specific
......@@ -221,25 +221,25 @@ class TestAccounting_l10n_M9(ERP5TypeTestCase):
account = self._getAccount('4718',
gap='fr/m9/4/47/471/4718', )
self.checkAccountTypeConsistency(account)
self.assertEquals('liability/payable', account.getAccountType())
self.assertEqual('liability/payable', account.getAccountType())
def test_AccountTypeConstaintFixFor4721(self):
account = self._getAccount('4721',
gap='fr/m9/4/47/472/4721', )
self.checkAccountTypeConsistency(account)
self.assertEquals('asset/receivable', account.getAccountType())
self.assertEqual('asset/receivable', account.getAccountType())
def test_AccountTypeConstaintFixFor4731(self):
account = self._getAccount('4731',
gap='fr/m9/4/47/473/4731', )
self.checkAccountTypeConsistency(account)
self.assertEquals('asset/receivable', account.getAccountType())
self.assertEqual('asset/receivable', account.getAccountType())
def test_AccountTypeConstaintFixFor4735(self):
account = self._getAccount('4735',
gap='fr/m9/4/47/473/4735', )
self.checkAccountTypeConsistency(account)
self.assertEquals('liability/payable', account.getAccountType())
self.assertEqual('liability/payable', account.getAccountType())
def test_suite():
suite = unittest.TestSuite()
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -145,7 +145,7 @@ class TestApparelModel(ERP5TypeTestCase):
# check the cells have been copied
cell_list = apparel_model.contentValues(portal_type = 'Mapped Value')
self.assertEquals(len(cell_list), 2)
self.assertEqual(len(cell_list), 2)
acrylique = apparel_model.getCell(
'composition/acrylique',
......
......@@ -623,7 +623,7 @@ class TestApparelTransformation(TestOrderMixin, ERP5TypeTestCase):
(expected_amount_list_len, actual_amount_list_len,
expected['id'])
# Check the number of aggregated components
self.assertEquals(actual_amount_list_len, expected_amount_list_len,
self.assertEqual(actual_amount_list_len, expected_amount_list_len,
error_msg)
# Check quantity for each component
......@@ -644,7 +644,7 @@ class TestApparelTransformation(TestOrderMixin, ERP5TypeTestCase):
'amount.categories : %s)' % \
(e_price, a_price, a_amount.getResource(),
expected['id'], a_amount.getCategoryList())
self.failIf(error, error_msg)
self.assertFalse(error, error_msg)
# Check duration for each component
a_duration = a_amount.getDuration()
......@@ -663,14 +663,14 @@ class TestApparelTransformation(TestOrderMixin, ERP5TypeTestCase):
(e_duration, a_duration,
a_amount.getResource(), expected['id'],
a_amount.getCategoryList())
self.failIf(error, error_msg)
self.assertFalse(error, error_msg)
# Check global quantity
total_price = aggregated_amount_list.getTotalPrice()
error_msg = 'Total price for AggregatedAmountList differs between ' \
'expected (%s) and aggregated (%s) (%s)' % \
(total_price, expected['total'], expected['id'])
self.assertEquals(round(total_price, 10), round(expected['total'], 10),
self.assertEqual(round(total_price, 10), round(expected['total'], 10),
error_msg)
# Check global duration
......@@ -691,7 +691,7 @@ class TestApparelTransformation(TestOrderMixin, ERP5TypeTestCase):
LOG('TEST ERROR :', 0, error_msg)
# XXX Is it alright to exit this test with an error without raising
# anything?
# self.failIf(error, error_msg)
# self.assertFalse(error, error_msg)
def test_01_getAggregatedAmountList(self):
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -129,7 +129,7 @@ class TestDataProtection(ERP5TypeTestCase):
# or default value is returned.
self.assertFalse(document.getProperty(property_id))
# View History permission is now granted only for Manager
self.assertEquals(document._View_History_Permission, ('Manager',))
self.assertEqual(document._View_History_Permission, ('Manager',))
def stepEraseWorkflowHistoryCommentList(self, sequence=None,
sequence_list=None, **kw):
......@@ -156,7 +156,7 @@ class TestDataProtection(ERP5TypeTestCase):
# Last comment of edit workflow is filled by data protection action
self.assertTrue(workflow_history['edit_workflow'][-1].get('comment'))
# View History permission is now granted only for Manager
self.assertEquals(document._View_History_Permission, ('Manager',))
self.assertEqual(document._View_History_Permission, ('Manager',))
def test_01_dataProtectionRequest(self):
"""This test create a person with a compromised description.
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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