diff options
| author | David Smith <smithdc@gmail.com> | 2020-05-26 22:56:41 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2020-05-29 06:47:51 +0200 |
| commit | 0382ecfe020b4c51b4c01e4e9a21892771e66941 (patch) | |
| tree | dd02f774b9f3d5df56053516b019d77852ccb491 /tests/utils_tests | |
| parent | 3111b434e76e68a0c1bdb0e3f0c599b249b173ad (diff) | |
Fixed #28694 -- Made django.utils.text.slugify() strip dashes and underscores.
Diffstat (limited to 'tests/utils_tests')
| -rw-r--r-- | tests/utils_tests/test_text.py | 4 |
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), |
