def test_to_python(self): v = StringListValidator() self.assertEquals(v.to_python("1, 2, 3, ",None),['1','2','3']) self.assertRaises(Invalid,v.to_python,None,None)
def test_from_python(self): v = StringListValidator() self.assertEquals(v.from_python(['1','2','3'],None),"1, 2, 3")