You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
785 B
22 lines
785 B
# -*- coding: utf-8 -*-
|
|
from openerp.tests.common import TransactionCase
|
|
import logging
|
|
_logger = logging.getLogger(__name__)
|
|
|
|
|
|
class TestSplit(TransactionCase):
|
|
|
|
def setUp(self):
|
|
super(TestSplit, self).setUp()
|
|
self.partnerX = self.env.ref('base.res_partner_12')
|
|
|
|
def test_init1(self):
|
|
address = u"278 route pitoresque de la vallee de" \
|
|
u" l'ours qui fuit les chasseurs"
|
|
partner = self.partnerX
|
|
partner.street = address
|
|
address1, address2 = partner._get_split_address(2, 40)
|
|
self.assertEqual('278 route pitoresque de la vallee de', address1)
|
|
self.assertEqual(u"l'ours qui fuit les chasseurs ", address2)
|
|
self.assertTrue(len(address1) <= 40)
|
|
self.assertTrue(len(address2) <= 40)
|