test/unittest_utils.py
author David Douard <david.douard@logilab.fr>
Sun, 26 Oct 2014 18:30:36 +0100
changeset 1736 72ec6c7e956c
parent 1501 a45f5a997ab2
permissions -rw-r--r--
[apycotlib] port to narval 4.2 The connection handler is now a CWProxy (cwclientlib), and there is no CreateSubEntity view any more since we can now create File entity using cwclientlib and rqlcontroller.

#!/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()