Child: [ddf08c] (diff)

Download this file

test_dispatch.py    20 lines (12 with data), 478 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
from allura.tests import TestController
app = None
class TestDispatch(TestController):
validate_skip = True
def test_dispatch(self):
r = self.app.get('/dispatch/foo/')
assert r.body == 'index foo', r
r = self.app.get('/dispatch/foo/bar')
assert r.body == "default(foo)(('bar',))", r
self.app.get('/not_found', status=404)
self.app.get('/dispatch/', status=404)
# self.app.get('/hello/foo/bar', status=404)