blob: 3486d71d1f65ee243702f72fe2bce1db6e6c7b68 (
plain)
1
2
3
4
5
6
7
8
9
|
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)
|