コード例 #1
0
ファイル: test_parser.py プロジェクト: philpep/patchwork
 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
ファイル: test_parser.py プロジェクト: getpatchwork/patchwork
 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
ファイル: test_parser.py プロジェクト: getpatchwork/patchwork
 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
ファイル: test_parser.py プロジェクト: getpatchwork/patchwork
 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
ファイル: test_parser.py プロジェクト: getpatchwork/patchwork
 def test_whitespace_list_id(self):
     email = MIMEText('')
     email['List-Id'] = ' '
     project = find_project_by_header(email)
     self.assertEqual(project, None)
コード例 #6
0
ファイル: test_parser.py プロジェクト: getpatchwork/patchwork
 def test_no_list_id(self):
     email = MIMEText('')
     project = find_project_by_header(email)
     self.assertEqual(project, None)
コード例 #7
0
ファイル: test_parser.py プロジェクト: philpep/patchwork
 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
ファイル: test_parser.py プロジェクト: philpep/patchwork
 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
ファイル: test_parser.py プロジェクト: philpep/patchwork
 def test_whitespace_list_id(self):
     email = MIMEText('')
     email['List-Id'] = ' '
     project = find_project_by_header(email)
     self.assertEqual(project, None)
コード例 #10
0
ファイル: test_parser.py プロジェクト: philpep/patchwork
 def test_no_list_id(self):
     email = MIMEText('')
     project = find_project_by_header(email)
     self.assertEqual(project, None)