def test_to_python_correct_value_json(self): f = JSignatureField() val = [{"x": [1, 2], "y": [3, 4]}] val_str = '[{"x":[1,2], "y":[3,4]}]' self.assertEquals(val, f.to_python(val_str))
def test_to_python_empty(self): f = JSignatureField() for val in ['', [], '[]']: self.assertIsNone(f.to_python(val))