Ejemplo n.º 1
0
    def test_comma_separated_list_field(self):
        field = CommaSeparatedListField().bind(Form(), 'foo')
        field.process_formdata([u''])
        self.assertEqual(field.data, [u''])

        field.process_formdata(['a,comma,separated,list'])
        self.assertEqual(field.data, [u'a', u'comma', u'separated', u'list'])
Ejemplo n.º 2
0
    def test_comma_separated_list_field(self):
        field = CommaSeparatedListField().bind(Form(), "foo")
        field.process_formdata([""])
        self.assertEqual(field.data, [""])

        field.process_formdata(["a,comma,separated,list"])
        self.assertEqual(field.data, ["a", "comma", "separated", "list"])
Ejemplo n.º 3
0
    def test_comma_separated_list_field(self):
        field = CommaSeparatedListField().bind(Form(), 'foo')
        field.process_formdata([u''])
        self.assertEqual(field.data, [u''])

        field.process_formdata(['a,comma,separated,list'])
        self.assertEqual(field.data, [u'a', u'comma', u'separated', u'list'])