Commit fa2c6dce authored by Nicolas Delaby's avatar Nicolas Delaby

Update test according recent refactoring of Coordinate

Fix order of address.asText rendering.
assert that TypeBasedMethod is used.
parent 6e58d716
...@@ -138,8 +138,8 @@ class TestGeographicalAddress(ERP5TypeTestCase): ...@@ -138,8 +138,8 @@ class TestGeographicalAddress(ERP5TypeTestCase):
self.assertEquals(address.asText(), self.assertEquals(address.asText(),
"%s %s\n%s %s" % (self.street_address_number, "%s %s\n%s %s" % (self.street_address_number,
self.street_address_text, self.street_address_text,
self.city_text, self.zip_code_text,
self.zip_code_text)) self.city_text,))
def test_01_standardAddress(self, quiet=0, run=run_all_test): def test_01_standardAddress(self, quiet=0, run=run_all_test):
""" """
...@@ -163,7 +163,7 @@ class TestGeographicalAddress(ERP5TypeTestCase): ...@@ -163,7 +163,7 @@ class TestGeographicalAddress(ERP5TypeTestCase):
""" """
createZODBPythonScript(self.getPortal().portal_skins.custom, createZODBPythonScript(self.getPortal().portal_skins.custom,
'Address_asText', '', """ 'Address_asText', '', """
return '%s\\n%s %s' % \\ return '%s\\n%s %s COUNTRY' % \\
(context.getStreetAddress(), (context.getStreetAddress(),
context.getZipCode(), context.getCity()) context.getZipCode(), context.getCity())
""") """)
...@@ -178,7 +178,7 @@ return '%s\\n%s %s' % \\ ...@@ -178,7 +178,7 @@ return '%s\\n%s %s' % \\
""" """
address = sequence.get('address') address = sequence.get('address')
self.assertEquals(address.asText(), self.assertEquals(address.asText(),
"%s %s\n%s %s" % (self.street_address_number, "%s %s\n%s %s COUNTRY" % (self.street_address_number,
self.street_address_text, self.street_address_text,
self.zip_code_text, self.zip_code_text,
self.city_text)) self.city_text))
......
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