示例#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
 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
 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)