summaryrefslogtreecommitdiff
path: root/test.py
diff options
context:
space:
mode:
authordioexul <dioexul@gmail.com>2015-02-26 23:07:20 +0300
committerdioexul <dioexul@gmail.com>2015-02-26 23:07:20 +0300
commit04e980827f4fb3ad590fc10f16d736993badfddc (patch)
treedef5e754a467f7cdfcab55e7e3fb71ed007bef95 /test.py
parent8a521b0283f45b8d1bf4e991c51f49e9ff3fc82f (diff)
downloadpython-slugify-04e980827f4fb3ad590fc10f16d736993badfddc.tar.gz
Change tests
Diffstat (limited to 'test.py')
-rw-r--r--test.py25
1 files changed, 13 insertions, 12 deletions
diff --git a/test.py b/test.py
index 0dc89aa..f6a29de 100644
--- a/test.py
+++ b/test.py
@@ -80,21 +80,22 @@ class TestSequenceFunctions(unittest.TestCase):
r = slugify(txt)
self.assertEqual(r, "this-is-a-test")
- txt = 'Тестирование полных слов без замены'
- r = slugify(txt, max_length=20, word_boundary=True, save_order=False)
- self.assertEqual(r, "testirovanie-polnykh")
+ txt = 'one two three four five'
+ r = slugify(txt, max_length=13, word_boundary=True, save_order=True)
+ self.assertEqual(r, "one-two-three")
- txt = 'Тестирование полных слов без замены'
- r = slugify(txt, max_length=19, word_boundary=True, save_order=False)
- self.assertEqual(r, "testirovanie-slov")
+ txt = 'one two three four five'
+ r = slugify(txt, max_length=13, word_boundary=True, save_order=False)
+ self.assertEqual(r, "one-two-three")
- txt = 'Тестирование полных слов без замены'
- r = slugify(txt, max_length=20, word_boundary=True, save_order=True)
- self.assertEqual(r, "testirovanie-polnykh")
+ txt = 'one two three four five'
+ r = slugify(txt, max_length=12, word_boundary=True, save_order=False)
+ self.assertEqual(r, "one-two-four")
+
+ txt = 'one two three four five'
+ r = slugify(txt, max_length=12, word_boundary=True, save_order=True)
+ self.assertEqual(r, "one-two")
- txt = 'Тестирование полных слов без замены'
- r = slugify(txt, max_length=19, word_boundary=True, save_order=True)
- self.assertEqual(r, "testirovanie")
if __name__ == '__main__':