Пример #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)
Пример #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)
Пример #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)
Пример #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)
Пример #5
0
 def test_whitespace_list_id(self):
     email = MIMEText('')
     email['List-Id'] = ' '
     project = find_project_by_header(email)
     self.assertEqual(project, None)
Пример #6
0
 def test_no_list_id(self):
     email = MIMEText('')
     project = find_project_by_header(email)
     self.assertEqual(project, None)
Пример #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)
Пример #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)
Пример #9
0
 def test_whitespace_list_id(self):
     email = MIMEText('')
     email['List-Id'] = ' '
     project = find_project_by_header(email)
     self.assertEqual(project, None)
Пример #10
0
 def test_no_list_id(self):
     email = MIMEText('')
     project = find_project_by_header(email)
     self.assertEqual(project, None)