Ignore:
Timestamp:
21 Feb 2022, 06:21:10 (3 years ago)
Author:
Henrik Bettermann
Message:

Don't complain but remove leading and trailing whitespaces while converting values during import.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/utils/tests/test_converters.py

    r14008 r16818  
    200200        contact = Contact()
    201201        contact.age = 33
    202         input_data = dict(name='Rudi', age='99')
     202        input_data = dict(name='  Rudi    ', age=' 99 ')
    203203        converter = IObjectConverter(IContact)  # a converter to IContact
    204204        err, inv_err, data = converter.fromStringDict(
     
    283283    def test_textline(self):
    284284        contact = Contact()
    285         input_data = dict(name='Rudi')
     285        input_data = dict(name=' Rudi     ')
    286286        converter = IObjectConverter(IContact)  # a converter to IContact
    287287        err, inv_err, data = converter.fromStringDict(
     
    357357        # pass string ``contact`` instead of a real object
    358358        err, inv_err, data = converter.fromStringDict(
    359             dict(name='Gabi', age='23'), 'contact')
     359            dict(name='  Gabi  ', age='23  '), 'contact')
    360360        self.assertEqual(data['age'], 23)
    361361        self.assertEqual(data['name'], u'Gabi')
Note: See TracChangeset for help on using the changeset viewer.