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...')
 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')
 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!')
 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')
 def test_blank(self):
     subject = tasks.extract_email_subject_from_html_content('')
     self.assertEquals(subject, '')