示例#1
0
 def test_deconstruct(self):
     field = DynamicField()
     name, path, args, kwargs = field.deconstruct()
     DynamicField(*args, **kwargs)
示例#2
0
 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(self):
     field = DynamicField()
     name, path, args, kwargs = field.deconstruct()
     DynamicField(*args, **kwargs)
示例#5
0
 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)