mirror of
https://github.com/SectorLabs/django-localized-fields.git
synced 2025-10-29 18:18:57 +03:00
LocalizedUniqueSlugField should properly deconstruct 'enabled' flag
This commit is contained in:
@@ -297,10 +297,13 @@ class LocalizedSlugFieldTestCase(TestCase):
|
||||
"""Tests whether the :see:deconstruct function properly retains options
|
||||
specified in the constructor."""
|
||||
|
||||
field = LocalizedUniqueSlugField(populate_from="title")
|
||||
field = LocalizedUniqueSlugField(
|
||||
enabled=False, immutable=True, populate_from="title"
|
||||
)
|
||||
_, _, _, kwargs = field.deconstruct()
|
||||
|
||||
assert "populate_from" in kwargs
|
||||
assert not kwargs["enabled"]
|
||||
assert kwargs["immutable"]
|
||||
assert kwargs["populate_from"] == field.populate_from
|
||||
|
||||
@staticmethod
|
||||
|
||||
Reference in New Issue
Block a user