diff options
author | Loic Dachary <loic@dachary.org> | 2016-01-25 19:08:52 +0700 |
---|---|---|
committer | Andrew Browning <ayleph@thisshitistemp.com> | 2016-02-06 14:33:49 -0500 |
commit | 679f729221a1d93d1ca48ff6899a548e9daf8f95 (patch) | |
tree | 2b21839040746aa33c51c797792fcc08c85de562 /mediagoblin/tests | |
parent | 05f26e3abcd00576c97c9566b2fe33e5085f0601 (diff) | |
download | mediagoblin-679f729221a1d93d1ca48ff6899a548e9daf8f95.tar.lz mediagoblin-679f729221a1d93d1ca48ff6899a548e9daf8f95.tar.xz mediagoblin-679f729221a1d93d1ca48ff6899a548e9daf8f95.zip |
Fix #5079 - tags unicity is on the slug, not the name
Signed-off-by: Loic Dachary <loic@dachary.org>
Signed-off-by: Andrew Browning <ayleph@thisshitistemp.com>
Diffstat (limited to 'mediagoblin/tests')
-rw-r--r-- | mediagoblin/tests/test_tags.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mediagoblin/tests/test_tags.py b/mediagoblin/tests/test_tags.py index e25cc283..8358b052 100644 --- a/mediagoblin/tests/test_tags.py +++ b/mediagoblin/tests/test_tags.py @@ -33,6 +33,10 @@ def test_list_of_dicts_conversion(test_app): assert text.convert_to_tag_list_of_dicts('echo,echo') == [{'name': u'echo', 'slug': u'echo'}] + # When checking for duplicates, use the slug, not the tag + assert text.convert_to_tag_list_of_dicts('echo,#echo') == [{'name': u'#echo', + 'slug': u'echo'}] + # Make sure converting the list of dicts to a string works assert text.media_tags_as_string([{'name': u'yin', 'slug': u'yin'}, {'name': u'yang', 'slug': u'yang'}]) == \ |