Suite
This commit is contained in:
parent
611dc6f5f4
commit
525dda9f04
@ -32,13 +32,10 @@ class TestCoworkingCoworker(TransactionCase):
|
||||
|
||||
def test_full_address(self):
|
||||
""" Test full address rendering """
|
||||
full_contact_adress = fields.from_string(self.homer.full_contact_adress)
|
||||
self.assertEqual(full_contact_adress, {full_contact_adress = u'{} {} {}'.format \
|
||||
(street or u'', contact_zip or u'', city or u'').strip()})
|
||||
full_contact_adress = fields.Char.from_string(self.homer.full_contact_adress)
|
||||
self.assertEqual(full_contact_adress, {full_contact_adress = u'{} {} {}'.format (street or u'', contact_zip or u'', city or u'').strip()})
|
||||
|
||||
fulladdr = self.env{'street': '29 Grande rue',
|
||||
'contact_zip': '26270',
|
||||
'city': 'Loriol'}
|
||||
fulladdr = self.env{'street': '29 Grande rue', 'contact_zip': '26270', 'city': 'Loriol'}
|
||||
|
||||
self.assertEqual(fulladdr.full_contact_adress, '29 Grande rue 26270 Loriol')
|
||||
|
||||
@ -46,7 +43,7 @@ class TestCoworkingCoworker(TransactionCase):
|
||||
fulladdr = {'street': '29 Grande rue',
|
||||
'contact_zip': '26270',
|
||||
'city': 'Loriol'}
|
||||
self.env['coworking.coworker'].create(fulladdr)
|
||||
self.env['coworking.coworker'].create(full_contact_adress)
|
||||
self.assertIn('No full address valide', unicode(err.exception))
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user