From 04e980827f4fb3ad590fc10f16d736993badfddc Mon Sep 17 00:00:00 2001 From: dioexul Date: Thu, 26 Feb 2015 23:07:20 +0300 Subject: Change tests --- test.py | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'test.py') 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__': -- cgit v1.2.1