def test_default(self): field = EmailField(required=True, default='*****@*****.**') field.validate() self.assertEqual(field.to_python(), '*****@*****.**') self.assertEqual(field.to_native(), '*****@*****.**')
def test_set_value(self): field = EmailField(required=True) field.set_value('*****@*****.**') field.validate() self.assertEqual(field.to_python(), '*****@*****.**') self.assertEqual(field.to_native(), '*****@*****.**')