示例#1
0
 def test_deconstruct(self):
     field = EnumField(choices=["a", "b"])
     name, path, args, kwargs = field.deconstruct()
     assert path == "django_mysql.models.EnumField"
     assert kwargs["choices"] == [("a", "a"), ("b", "b")]
     assert "max_length" not in kwargs
     EnumField(*args, **kwargs)
示例#2
0
 def test_deconstruct(self):
     field = EnumField(choices=['a', 'b'])
     name, path, args, kwargs = field.deconstruct()
     assert path == 'django_mysql.models.EnumField'
     assert 'max_length' not in kwargs
     EnumField(*args, **kwargs)
 def test_deconstruct(self):
     field = EnumField(choices=['a', 'b'])
     name, path, args, kwargs = field.deconstruct()
     assert path == 'django_mysql.models.EnumField'
     assert 'max_length' not in kwargs
     EnumField(*args, **kwargs)