Esempio n. 1
0
 def test_limit_length(self):
     self.assertEqual(limit_length(None, 12), None)
     self.assertEqual(limit_length('foo', 12), 'foo')
     self.assertTrue(
         limit_length('foo bar baz asd', 12).startswith('foo bar'))
     self.assertTrue('...' in limit_length('foo bar baz asd', 12))
Esempio n. 2
0
 def test_limit_length(self):
     self.assertEqual(limit_length(None, 12), None)
     self.assertEqual(limit_length('foo', 12), 'foo')
     self.assertTrue(
         limit_length('foo bar baz asd', 12).startswith('foo bar'))
     self.assertTrue('...' in limit_length('foo bar baz asd', 12))
Esempio n. 3
0
 def test_limit_length(self):
     self.assertEqual(limit_length(None, 12), None)
     self.assertEqual(limit_length("foo", 12), "foo")
     self.assertTrue(limit_length("foo bar baz asd", 12).startswith("foo bar"))
     self.assertTrue("..." in limit_length("foo bar baz asd", 12))