コード例 #1
0
ファイル: test_validate_config.py プロジェクト: zancas/otter
 def test_no_shorten(self):
     """
     Does not shorten when required length is greated
     """
     self.assertEqual(shorten('manish is bad boy', 32), 'manish is bad boy')
コード例 #2
0
ファイル: test_validate_config.py プロジェクト: zancas/otter
 def test_shorten_equal(self):
     """
     Does not shorten when required length is equal
     """
     s = 'manish is bad boy'
     self.assertEqual(shorten(s, len(s)), s)
コード例 #3
0
ファイル: test_validate_config.py プロジェクト: zancas/otter
 def test_shortens(self):
     """
     shortens the string to required length
     """
     self.assertEqual(shorten('manish is bad boy', 12), 'manish is...')