diff options
author | Val Neekman <val@neekware.com> | 2012-10-14 19:21:46 -0700 |
---|---|---|
committer | Val Neekman <val@neekware.com> | 2012-10-14 19:21:46 -0700 |
commit | 19587b7674691f059c5058fdbb858284afea0e4b (patch) | |
tree | 0dbab9f02e9fa19c6cc6face5e9c21205170cb3a /test.py | |
parent | cce2c8edd87a9ac130c1e41b06959e77f71042ba (diff) | |
download | python-slugify-19587b7674691f059c5058fdbb858284afea0e4b.tar.gz |
added more test cases0.0.2
Diffstat (limited to 'test.py')
-rw-r--r-- | test.py | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -5,12 +5,16 @@ from slugify import slugify class TestSequenceFunctions(unittest.TestCase): - def test_space_dash(self): + def test_manager(self): + txt = "This is a test ---" r = slugify(txt) self.assertEquals(r, "this-is-a-test") - - def test_special_chars(self): + + txt = "This -- is a ## test ---" + r = slugify(txt) + self.assertEquals(r, "this-is-a-test") + txt = 'C\'est déjà l\'été.' r = slugify(txt) self.assertEquals(r, "cest-deja-lete") @@ -19,9 +23,9 @@ class TestSequenceFunctions(unittest.TestCase): r = slugify(txt) self.assertEquals(r, "nin-hao-wo-shi-zhong-guo-ren") - txt = '影師嗎' + txt = 'Компьютер' r = slugify(txt) - self.assertEquals(r, "ying-shi-ma") + self.assertEquals(r, "kompiuter") if __name__ == '__main__': unittest.main() |