예제 #1
0
파일: test_utils.py 프로젝트: ropable/prs
 def test_smart_truncate_new_suffix(self):
     """Test smart_truncate utility function with a defined suffix
     """
     s = """Cosby sweater iphone artisan, squid trust fund photo booth twee
         shoreditch single-origin coffee aesthetic jean shorts messenger bag
         brooklyn butcher. Iphone fap banksy next level put a bird on it,
         letterpress photo booth thundercats biodiesel fanny pack."""
     trunc = smart_truncate(content=s, suffix='...MORE')
     self.assertTrue(trunc.endswith('...MORE'), s)
예제 #2
0
파일: test_utils.py 프로젝트: ropable/prs
 def test_smart_truncate_long(self):
     """Test smart_truncate utility function with a long string
     """
     s = """Cosby sweater iphone artisan, squid trust fund photo booth twee
         shoreditch single-origin coffee aesthetic jean shorts messenger bag
         brooklyn butcher. Iphone fap banksy next level put a bird on it,
         letterpress photo booth thundercats biodiesel fanny pack."""
     trunc = smart_truncate(s)
     self.assertTrue(trunc.endswith('(more)'), s)
예제 #3
0
 def test_smart_truncate_new_suffix(self):
     """Test smart_truncate utility function with a defined suffix
     """
     s = """Cosby sweater iphone artisan, squid trust fund photo booth twee
         shoreditch single-origin coffee aesthetic jean shorts messenger bag
         brooklyn butcher. Iphone fap banksy next level put a bird on it,
         letterpress photo booth thundercats biodiesel fanny pack."""
     trunc = smart_truncate(content=s, suffix='...MORE')
     self.assertTrue(trunc.endswith('...MORE'), s)
예제 #4
0
 def test_smart_truncate_long(self):
     """Test smart_truncate utility function with a long string
     """
     s = """Cosby sweater iphone artisan, squid trust fund photo booth twee
         shoreditch single-origin coffee aesthetic jean shorts messenger bag
         brooklyn butcher. Iphone fap banksy next level put a bird on it,
         letterpress photo booth thundercats biodiesel fanny pack."""
     trunc = smart_truncate(s)
     self.assertTrue(trunc.endswith('(more)'), s)
예제 #5
0
파일: test_utils.py 프로젝트: ropable/prs
 def test_smart_truncate_short(self):
     """Test smart_truncate utility function with a short string
     """
     s = 'Quinoa cred brooklyn, sartorial letterpress.'
     trunc = smart_truncate(s)
     self.assertTrue(trunc.endswith('letterpress.'))
예제 #6
0
 def test_smart_truncate_short(self):
     """Test smart_truncate utility function with a short string
     """
     s = 'Quinoa cred brooklyn, sartorial letterpress.'
     trunc = smart_truncate(s)
     self.assertTrue(trunc.endswith('letterpress.'))