diff options
| author | dioexul <dioexul@gmail.com> | 2015-02-22 21:21:27 +0300 |
|---|---|---|
| committer | dioexul <dioexul@gmail.com> | 2015-02-22 21:21:27 +0300 |
| commit | 8a521b0283f45b8d1bf4e991c51f49e9ff3fc82f (patch) | |
| tree | 236e7edf314e6c52c13c65839b642c163b273c3a /test.py | |
| parent | 07155c2001580b0ec70b40f24a475baef6238aac (diff) | |
| download | python-slugify-8a521b0283f45b8d1bf4e991c51f49e9ff3fc82f.tar.gz | |
Add parameter 'save_order'.
Diffstat (limited to 'test.py')
| -rw-r--r-- | test.py | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -80,5 +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 = 'Тестирование полных слов без замены' + r = slugify(txt, max_length=19, word_boundary=True, save_order=False) + self.assertEqual(r, "testirovanie-slov") + + txt = 'Тестирование полных слов без замены' + r = slugify(txt, max_length=20, word_boundary=True, save_order=True) + self.assertEqual(r, "testirovanie-polnykh") + + txt = 'Тестирование полных слов без замены' + r = slugify(txt, max_length=19, word_boundary=True, save_order=True) + self.assertEqual(r, "testirovanie") + + if __name__ == '__main__': unittest.main()
\ No newline at end of file |
