Example #1
0
 def test_short_list_id(self):
     """Some mailing lists have List-Id headers in short formats, where it
        is only the list ID itself (without enclosing angle-brackets). """
     email = MIMEText('')
     email['List-Id'] = self.project.listid
     project = find_project_by_header(email)
     self.assertEqual(project, self.project)
Example #2
0
 def test_short_list_id(self):
     """Some mailing lists have List-Id headers in short formats, where it
        is only the list ID itself (without enclosing angle-brackets). """
     email = MIMEText('')
     email['List-Id'] = self.project.listid
     project = find_project_by_header(email)
     self.assertEqual(project, self.project)
Example #3
0
 def test_long_list_id(self):
     email = MIMEText('')
     email['List-Id'] = 'Test text <%s>' % self.project.listid
     project = find_project_by_header(email)
     self.assertEqual(project, self.project)
Example #4
0
 def test_substring_list_id(self):
     email = MIMEText('')
     email['List-Id'] = 'example.com'
     project = find_project_by_header(email)
     self.assertEqual(project, None)
Example #5
0
 def test_whitespace_list_id(self):
     email = MIMEText('')
     email['List-Id'] = ' '
     project = find_project_by_header(email)
     self.assertEqual(project, None)
Example #6
0
 def test_no_list_id(self):
     email = MIMEText('')
     project = find_project_by_header(email)
     self.assertEqual(project, None)
Example #7
0
 def test_long_list_id(self):
     email = MIMEText('')
     email['List-Id'] = 'Test text <%s>' % self.project.listid
     project = find_project_by_header(email)
     self.assertEqual(project, self.project)
Example #8
0
 def test_substring_list_id(self):
     email = MIMEText('')
     email['List-Id'] = 'example.com'
     project = find_project_by_header(email)
     self.assertEqual(project, None)
Example #9
0
 def test_whitespace_list_id(self):
     email = MIMEText('')
     email['List-Id'] = ' '
     project = find_project_by_header(email)
     self.assertEqual(project, None)
Example #10
0
 def test_no_list_id(self):
     email = MIMEText('')
     project = find_project_by_header(email)
     self.assertEqual(project, None)