mirror of https://github.com/kianby/blog
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
309 B
Python
10 lines
309 B
Python
5 years ago
|
import unittest
|
||
|
import makesite
|
||
|
|
||
|
|
||
|
class TruncateTest(unittest.TestCase):
|
||
|
def test_truncate(self):
|
||
|
long_text = ' \n'.join('word' + str(i) for i in range(50))
|
||
|
expected_text = ' '.join('word' + str(i) for i in range(25))
|
||
|
self.assertEqual(makesite.truncate(long_text), expected_text)
|