We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3ce57ed commit 32696f4Copy full SHA for 32696f4
tests/test_slug_fields.py
@@ -81,6 +81,14 @@ def test_uniue_slug_no_change(cls):
81
assert old_slug_en == obj.slug.en
82
assert old_slug_nl != obj.slug.nl
83
84
+ @classmethod
85
+ def test_unique_slug_update(cls):
86
+ obj = cls.Model.objects.create(title={settings.LANGUAGE_CODE: 'mytitle'})
87
+ assert obj.slug.get() == 'mytitle'
88
+ obj.title.set(settings.LANGUAGE_CODE, 'othertitle')
89
+ obj.save()
90
+ assert obj.slug.get() == 'othertitle'
91
+
92
@classmethod
93
def test_unique_slug_unique_max_retries(cls):
94
"""Tests whether the unique slug implementation doesn't
0 commit comments