def test_deconstruct(self): field = DynamicField() name, path, args, kwargs = field.deconstruct() DynamicField(*args, **kwargs)
def test_deconstruct_spec(self): field = DynamicField(spec={'this': int, 'that': float}) name, path, args, kwargs = field.deconstruct() assert path == 'django_mysql.models.DynamicField' DynamicField(*args, **kwargs)
def test_deconstruct_spec(self): field = DynamicField(spec={"this": int, "that": float}) name, path, args, kwargs = field.deconstruct() assert path == "django_mysql.models.DynamicField" DynamicField(*args, **kwargs)
def test_deconstruct_blank(self): field = DynamicField(blank=False) name, path, args, kwargs = field.deconstruct() assert kwargs["blank"] is False DynamicField(*args, **kwargs)
def test_deconstruct_default(self): field = DynamicField(default=make_default) name, path, args, kwargs = field.deconstruct() assert kwargs["default"] is make_default DynamicField(*args, **kwargs)