diff --git a/archivebox/core/forms.py b/archivebox/core/forms.py index cbd06223..2cc025ae 100644 --- a/archivebox/core/forms.py +++ b/archivebox/core/forms.py @@ -34,7 +34,7 @@ def _split_strip(value: str, delimiter: str) -> list[str]: def parse_tag_string(value: str | None) -> list[str]: - """Parse the legacy tag-editing format without depending on django-taggit.""" + """Parse the legacy tag-editing format used by the admin tag field.""" if not value: return [] diff --git a/archivebox/tests/test_core_forms.py b/archivebox/tests/test_core_forms.py index f9b1b51f..1f29e200 100644 --- a/archivebox/tests/test_core_forms.py +++ b/archivebox/tests/test_core_forms.py @@ -7,7 +7,7 @@ from archivebox.core.models import Tag pytestmark = pytest.mark.django_db -def test_tag_field_parses_legacy_tag_input_without_taggit(): +def test_tag_field_parses_legacy_tag_input(): field = TagField() assert field.clean("alpha beta alpha") == ["alpha", "beta"] @@ -18,7 +18,7 @@ def test_tag_field_parses_legacy_tag_input_without_taggit(): assert field.clean('"alpha,beta') == ["alpha", "beta"] -def test_tag_widget_formats_real_tag_rows_without_taggit(): +def test_tag_widget_formats_real_tag_rows(): tags = [ Tag.objects.create(name="plain"), Tag.objects.create(name="two words"), @@ -27,5 +27,5 @@ def test_tag_widget_formats_real_tag_rows_without_taggit(): rendered_value = TagWidget().format_value(tags) - assert rendered_value == '"comma,tag", plain, "two words"' + assert rendered_value == '"comma,tag", "two words", plain' assert TagField().clean(rendered_value) == ["comma,tag", "plain", "two words"]