comparison tests/test_serving.py @ 332:d8c28e496bb3

tests: Fix test.
author Ludovic Chabant <ludovic@chabant.com>
date Wed, 01 Apr 2015 00:35:04 -0700
parents 65e6d72f3877
children 4b1019bb2533
comparison
equal deleted inserted replaced
331:f0fc2a9d3191 332:d8c28e496bb3
12 12
13 @pytest.mark.parametrize('uri, route_specs, expected', 13 @pytest.mark.parametrize('uri, route_specs, expected',
14 [ 14 [
15 ('/', 15 ('/',
16 [{'src': 'pages', 'pat': '(?P<path>.*)'}], 16 [{'src': 'pages', 'pat': '(?P<path>.*)'}],
17 [('pages', {'path': ''})]), 17 [('pages', {'path': '/'})]),
18 ('/', 18 ('/',
19 [{'src': 'pages', 'pat': '(?P<path>.*)'}, 19 [{'src': 'pages', 'pat': '(?P<path>.*)'},
20 {'src': 'theme', 'pat': '(?P<path>.*)', 'realm': REALM_THEME}], 20 {'src': 'theme', 'pat': '(?P<path>.*)', 'realm': REALM_THEME}],
21 [('pages', {'path': ''}), ('theme', {'path': ''})]) 21 [('pages', {'path': '/'}), ('theme', {'path': '/'})])
22 ]) 22 ])
23 def test_find_routes(uri, route_specs, expected): 23 def test_find_routes(uri, route_specs, expected):
24 routes = [] 24 routes = []
25 for rs in route_specs: 25 for rs in route_specs:
26 m = mock.Mock() 26 m = mock.Mock()