def test_toFieldValue(self): jlc = JsonListConverter(List(missing_value=['nothing']), None) self.assertEqual(jlc.toFieldValue('test'), ['nothing']) self.assertEqual(jlc.toFieldValue(['test']), ['test'])
def test_toWidgetValue(self): jlc = JsonListConverter(List(), None) self.assertEqual(jlc.toWidgetValue('test'), 'test') self.assertEqual(jlc.toWidgetValue(['test']), ['test'])