summaryrefslogtreecommitdiff
path: root/tests/utils_tests/test_text.py
diff options
context:
space:
mode:
authorDavid Smith <smithdc@gmail.com>2020-05-26 22:56:41 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2020-05-29 06:47:51 +0200
commit0382ecfe020b4c51b4c01e4e9a21892771e66941 (patch)
treedd02f774b9f3d5df56053516b019d77852ccb491 /tests/utils_tests/test_text.py
parent3111b434e76e68a0c1bdb0e3f0c599b249b173ad (diff)
Fixed #28694 -- Made django.utils.text.slugify() strip dashes and underscores.
Diffstat (limited to 'tests/utils_tests/test_text.py')
-rw-r--r--tests/utils_tests/test_text.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/utils_tests/test_text.py b/tests/utils_tests/test_text.py
index 2310c9c2a0..f7a0a807e1 100644
--- a/tests/utils_tests/test_text.py
+++ b/tests/utils_tests/test_text.py
@@ -195,6 +195,10 @@ class TestUtilsText(SimpleTestCase):
(' multiple---dash and space ', 'multiple-dash-and-space', False),
('\t whitespace-in-value \n', 'whitespace-in-value', False),
('underscore_in-value', 'underscore_in-value', False),
+ ('__strip__underscore-value___', 'strip__underscore-value', False),
+ ('--strip-dash-value---', 'strip-dash-value', False),
+ ('__strip-mixed-value---', 'strip-mixed-value', False),
+ ('_ -strip-mixed-value _-', 'strip-mixed-value', False),
('spam & ıçüş', 'spam-ıçüş', True),
('foo ıç bar', 'foo-ıç-bar', True),
(' foo ıç bar', 'foo-ıç-bar', True),