Example #1
0
 def test_gt_maxlen(self):
     expected = u'a long string…'
     actual = helper.shorten('a long string that is full of text', 14)
     self.assertEqual(expected, actual)
Example #2
0
 def test_eq_maxlen(self):
     expected = 'a string'
     actual = helper.shorten(expected, len(expected))
     self.assertEqual(expected, actual)
Example #3
0
 def test_lt_maxlen(self):
     expected = u'a string'
     actual = helper.shorten(expected, 25)
     self.assertEqual(expected, actual)
Example #4
0
 def test_gt_maxlen(self):
     expected = u'a long string…'
     actual = helper.shorten('a long string that is full of text', 14)
     self.assertEqual(expected, actual)
Example #5
0
 def test_eq_maxlen(self):
     expected = 'a string'
     actual = helper.shorten(expected, len(expected))
     self.assertEqual(expected, actual)
Example #6
0
 def test_lt_maxlen(self):
     expected = u'a string'
     actual = helper.shorten(expected, 25)
     self.assertEqual(expected, actual)