Commit f29bb1da authored by Rafael Monnerat's avatar Rafael Monnerat

Update test to use respect Telephone Behaviour

The Telephone is always presented using "+(0)" format, this is a feature
and expected behaviour.
parent f2f0f118
...@@ -115,8 +115,12 @@ class TestERP5WebWithCRM(ERP5TypeTestCase): ...@@ -115,8 +115,12 @@ class TestERP5WebWithCRM(ERP5TypeTestCase):
self.login() self.login()
# Now a web message has been created # Now a web message has been created
telephone_key = 'source_person_default_telephone_text'
event = self.portal.event_module.objectValues()[0] event = self.portal.event_module.objectValues()[0]
for property_id, value in form_kw.iteritems(): for property_id, value in form_kw.iteritems():
if property_id == telephone_key:
value = '+(0)-%s' % value
self.assertEquals(event.getProperty(property_id), value) self.assertEquals(event.getProperty(property_id), value)
self.assertEquals(event.getSourceCarrier(), web_section.getRelativeUrl()) self.assertEquals(event.getSourceCarrier(), web_section.getRelativeUrl())
self.assertTrue(event.hasStartDate()) self.assertTrue(event.hasStartDate())
...@@ -165,10 +169,14 @@ class TestERP5WebWithCRM(ERP5TypeTestCase): ...@@ -165,10 +169,14 @@ class TestERP5WebWithCRM(ERP5TypeTestCase):
self.logout() self.logout()
self.login() self.login()
telephone_key = "source_person_default_telephone_text"
# Now a web message has been created # Now a web message has been created
event = self.portal.event_module.objectValues()[0] event = self.portal.event_module.objectValues()[0]
for property_id, value in form_kw.iteritems(): for property_id, value in form_kw.iteritems():
if property_id == telephone_key:
value = '+(0)-%s' % value
self.assertEquals(event.getProperty(property_id), value) self.assertEquals(event.getProperty(property_id), value)
self.assertEquals(event.getSourceCarrier(), web_section.getRelativeUrl()) self.assertEquals(event.getSourceCarrier(), web_section.getRelativeUrl())
self.assertTrue(event.hasStartDate()) self.assertTrue(event.hasStartDate())
self.assertTrue(event.hasSource()) # User was connected self.assertTrue(event.hasSource()) # User was connected
......
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