test for no rules matching a test case

Change-Id: I4cff5abf704e244158181d8e42cc1c09da30467b
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann 2017-09-08 14:56:54 -04:00
parent c323784ef3
commit 1b843c2147
1 changed files with 11 additions and 0 deletions

View File

@ -27,6 +27,17 @@ class TestProcessTests(base.TestCase):
'redirect', '301', '/path', '/new/path',
)
def test_zero_matches(self):
actual = app.process_tests(
self.ruleset,
[(1, '/alternate/path', '301', '/new/path')],
)
expected = (
[(1, '/alternate/path', '301', '/new/path')],
{1},
)
self.assertEqual(expected, actual)
def test_one_match(self):
actual = app.process_tests(
self.ruleset,