test/unittest_utils.py
author Julien Cristau <julien.cristau@logilab.fr>
Wed, 09 Jul 2014 11:36:06 +0200
changeset 1547 9012705e9076
parent 1501 a45f5a997ab2
permissions -rw-r--r--
[narval/debcheck] use a glob instead of a recursive os.walk to find *.changes We know where those files are, there's no need to do a recursive search. This also avoids issues with os.walk with non-ascii file names. ***

#!/usr/bin/python

from logilab.common.testlib import TestCase, unittest_main
from cubicweb import devtools # setup import machinery
from cubes.apycot.entities import text_to_dict

class TextToDictTC(TestCase):
    def test_multiple(self):
        self.assertEqual(text_to_dict('''muloption=1
muloption= 2
single= hop
'''),
                          {'muloption': ['1', '2'],
                           'single': 'hop'})

if __name__ == '__main__':
    unittest_main()