Пример #1
0
 def test_wo_title_block_gt_40_chars_content(self):
     subject = tasks.extract_email_subject_from_html_content((
         ' This is reallly long content that is greater than 40 chars on the first line. It should have ...'
     ))
     self.assertEquals(subject, 'This is reallly long content that is gre...')
Пример #2
0
 def test_wo_title_block_under_40_chars_multiline_content(self):
     subject = tasks.extract_email_subject_from_html_content((
         ' Small content \n'
         'that spans multiple lines'
     ))
     self.assertEquals(subject, 'Small content')
Пример #3
0
 def test_with_title_block(self):
     subject = tasks.extract_email_subject_from_html_content('<html><head><title> Hello! </title></head></html>')
     self.assertEquals(subject, 'Hello!')
Пример #4
0
 def test_wo_title_block_under_40_chars_content(self):
     subject = tasks.extract_email_subject_from_html_content(' Small content ')
     self.assertEquals(subject, 'Small content')
Пример #5
0
 def test_blank(self):
     subject = tasks.extract_email_subject_from_html_content('')
     self.assertEquals(subject, '')