summaryrefslogtreecommitdiff
path: root/test.py
diff options
context:
space:
mode:
authorLucas Woltmann <lwoltmann@gmx.de>2015-11-12 11:15:58 +0100
committerLucas Woltmann <lwoltmann@gmx.de>2015-11-12 11:15:58 +0100
commita1543fe0ae019606bec660d6cf2e70a435ff29e4 (patch)
treeb5e9f1cc5cdd5c03f9e8afd1834870aaaf7123bb /test.py
parent4091b444746032847ccce0d5c6a0cd5b1bb73d81 (diff)
downloadpython-slugify-a1543fe0ae019606bec660d6cf2e70a435ff29e4.tar.gz
fixed stopword replacement bug (different separators)
Diffstat (limited to 'test.py')
-rw-r--r--test.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/test.py b/test.py
index 7f039a2..c5e6265 100644
--- a/test.py
+++ b/test.py
@@ -131,6 +131,11 @@ class TestSlugification(unittest.TestCase):
r = slugify(txt, stopwords=['the', 'in', 'a', 'hurry'])
self.assertEqual(r, 'quick-brown-fox-jumps-over-lazy-dog')
+ def test_stopwords_with_different_separator(self):
+ txt = 'the quick brown fox jumps over the lazy dog'
+ r = slugify(txt, stopwords=['the'], separator=' ')
+ self.assertEqual(r, 'quick brown fox jumps over lazy dog')
+
def test_html_entities(self):
txt = 'foo &amp; bar'
r = slugify(txt)