コード例 #1
0
 def test_make_link_with_chain(self):
     # Test that make_link() with a given chain creates a Link with a jump
     # action to the chain.
     link = make_link('Subject', '[tT]esting', 'accept')
     self.assertEqual(link.rule.header, 'Subject')
     self.assertEqual(link.rule.pattern, '[tT]esting')
     self.assertEqual(link.action, LinkAction.jump)
     self.assertEqual(link.chain, config.chains['accept'])
コード例 #2
0
ファイル: test_headers.py プロジェクト: aswinpj/Mailman
 def test_make_link_with_chain(self):
     # Test that make_link() with a given chain creates a Link with a jump
     # action to the chain.
     link = make_link('Subject', '[tT]esting', 'accept')
     self.assertEqual(link.rule.header, 'Subject')
     self.assertEqual(link.rule.pattern, '[tT]esting')
     self.assertEqual(link.action, LinkAction.jump)
     self.assertEqual(link.chain, config.chains['accept'])
コード例 #3
0
 def test_make_link(self):
     # Test that make_link() with no given chain creates a Link with a
     # deferred link action.
     link = make_link('Subject', '[tT]esting')
     self.assertEqual(link.rule.header, 'Subject')
     self.assertEqual(link.rule.pattern, '[tT]esting')
     self.assertEqual(link.action, LinkAction.defer)
     self.assertIsNone(link.chain)
コード例 #4
0
ファイル: test_headers.py プロジェクト: aswinpj/Mailman
 def test_make_link(self):
     # Test that make_link() with no given chain creates a Link with a
     # deferred link action.
     link = make_link('Subject', '[tT]esting')
     self.assertEqual(link.rule.header, 'Subject')
     self.assertEqual(link.rule.pattern, '[tT]esting')
     self.assertEqual(link.action, LinkAction.defer)
     self.assertIsNone(link.chain)