diff options
author | Aaron Williamson <aaron@copiesofcopies.org> | 2011-05-13 12:18:52 -0400 |
---|---|---|
committer | Aaron Williamson <aaron@copiesofcopies.org> | 2011-05-13 12:18:52 -0400 |
commit | 0546833c6ea4dcaaa82861819916760dd62d8fa7 (patch) | |
tree | a3af4f252b44f4bfdaf6e192e38c0aa4b8408ac3 /mediagoblin/tests/test_util.py | |
parent | a8e2812b054f49e4085bf6b8c0b9e0c5f1b8d312 (diff) | |
download | mediagoblin-0546833c6ea4dcaaa82861819916760dd62d8fa7.tar.lz mediagoblin-0546833c6ea4dcaaa82861819916760dd62d8fa7.tar.xz mediagoblin-0546833c6ea4dcaaa82861819916760dd62d8fa7.zip |
Generate unique slugs for newly submitted images.
Diffstat (limited to 'mediagoblin/tests/test_util.py')
-rw-r--r-- | mediagoblin/tests/test_util.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mediagoblin/tests/test_util.py b/mediagoblin/tests/test_util.py index ff40a677..7b00a074 100644 --- a/mediagoblin/tests/test_util.py +++ b/mediagoblin/tests/test_util.py @@ -70,6 +70,14 @@ I hope you like unit tests JUST AS MUCH AS I DO!""" I hope you like unit tests JUST AS MUCH AS I DO!""" +def test_slugify(): + assert util.slugify('a walk in the park') == 'a-walk-in-the-park' + assert util.slugify('A Walk in the Park') == 'a-walk-in-the-park' + assert util.slugify('a walk in the park') == 'a-walk-in-the-park' + assert util.slugify('a walk in-the-park') == 'a-walk-in-the-park' + assert util.slugify('a w@lk in the park?') == 'a-w-lk-in-the-park' + assert util.slugify(u'a walk in the par\u0107') == 'a-walk-in-the-parc' + assert util.slugify(u'\u00E0\u0042\u00E7\u010F\u00EB\u0066') == 'abcdef' def test_locale_to_lower_upper(): """ |