Skip to content
This repository was archived by the owner on Apr 23, 2022. It is now read-only.

Commit 762103b

Browse files
author
Julien Maupetit
committed
Add tests for utils
1 parent 125068f commit 762103b

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

tests/test_utils.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import os.path
2+
3+
from climate.utils import slugify
4+
5+
6+
def test_slugify_with_special_chars():
7+
"""Test slugify() with punctuation marks"""
8+
9+
text = 'France (Europe)'
10+
expected = 'france-europe'
11+
assert slugify(text) == expected
12+
13+
14+
def test_slugify_with_unicode_chars():
15+
"""Test slugify() with unicode chars"""
16+
17+
text = 'Åland'
18+
expected = 'aland'
19+
assert slugify(text) == expected

0 commit comments

Comments
 (0)