|
10 | 10 | from tagging import settings |
11 | 11 | from tagging.forms import TagField |
12 | 12 | from tagging.models import Tag, TaggedItem |
13 | | -from tagging.tests.models import Article, Link, Perch, Parrot, FormTest |
14 | | -from tagging.utils import calculate_cloud, edit_string_for_tags, get_tag_list, get_tag, parse_tag_input |
| 13 | +from tagging.tests.models import Article, Link, Perch, Parrot, FormTest, FormTestNull |
| 14 | +from tagging.utils import (calculate_cloud, edit_string_for_tags, get_tag_list, |
| 15 | + get_tag, parse_tag_input) |
15 | 16 | from tagging.utils import LINEAR |
16 | 17 |
|
17 | 18 |
|
@@ -326,6 +327,14 @@ def test_update_tags_exotic_characters(self): |
326 | 327 | self.assertEqual(len(tags), 1) |
327 | 328 | self.assertEqual(tags[0].name, '你好') |
328 | 329 |
|
| 330 | + def test_unicode_tagged_object(self): |
| 331 | + self.dead_parrot.state = u"dëad" |
| 332 | + self.dead_parrot.save() |
| 333 | + Tag.objects.update_tags(self.dead_parrot, u'föo') |
| 334 | + items = TaggedItem.objects.all() |
| 335 | + self.assertEqual(len(items), 1) |
| 336 | + self.assertEqual(unicode(items[0]), u"dëad [föo]") |
| 337 | + |
329 | 338 | def test_update_tags_with_none(self): |
330 | 339 | # start off in a known, mildly interesting state |
331 | 340 | Tag.objects.update_tags(self.dead_parrot, 'foo bar baz') |
|
0 commit comments