Example #1
0
def test_tag_parser():
    assert utils.parse_tags('') == []
    assert utils.parse_tags(None) == []
    assert utils.parse_tags('one') == ['one']
    assert utils.parse_tags('one, two') == ['one', 'two']
    assert utils.parse_tags('one,two') == ['one', 'two']
    assert utils.parse_tags('one,two,two') == ['one', 'two']
    assert utils.parse_tags('one two', delim=' ') == ['one', 'two']
Example #2
0
 def process_formdata(self, valuelist):
     if valuelist:
         valuelist = valuelist[0]
     self.data = parse_tags(valuelist)