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)
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)