1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

Fixes #3721: Allow Unicode characters in tag slugs

This commit is contained in:
Jeremy Stretch
2020-01-17 17:25:46 -05:00
parent aa73a7ad02
commit 606f3dacbb
3 changed files with 19 additions and 1 deletions

View File

@@ -3,7 +3,7 @@ from django.test import TestCase
from dcim.models import Site
from extras.choices import TemplateLanguageChoices
from extras.models import Graph
from extras.models import Graph, Tag
class GraphTest(TestCase):
@@ -44,3 +44,12 @@ class GraphTest(TestCase):
self.assertEqual(graph.embed_url(self.site), RENDERED_TEXT)
self.assertEqual(graph.embed_link(self.site), RENDERED_TEXT)
class TagTest(TestCase):
def test_create_tag_unicode(self):
tag = Tag(name='Testing Unicode: 台灣')
tag.save()
self.assertEqual(tag.slug, 'testing-unicode-台灣')