diff options
author | dioexul <dioexul@gmail.com> | 2015-02-26 23:07:20 +0300 |
---|---|---|
committer | dioexul <dioexul@gmail.com> | 2015-02-26 23:07:20 +0300 |
commit | 04e980827f4fb3ad590fc10f16d736993badfddc (patch) | |
tree | def5e754a467f7cdfcab55e7e3fb71ed007bef95 /test.py | |
parent | 8a521b0283f45b8d1bf4e991c51f49e9ff3fc82f (diff) | |
download | python-slugify-04e980827f4fb3ad590fc10f16d736993badfddc.tar.gz |
Change tests
Diffstat (limited to 'test.py')
-rw-r--r-- | test.py | 25 |
1 files changed, 13 insertions, 12 deletions
@@ -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__': |