summaryrefslogtreecommitdiff
path: root/test/test_mount.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_mount.py')
-rw-r--r--test/test_mount.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/test_mount.py b/test/test_mount.py
index bff6806..fc24638 100644
--- a/test/test_mount.py
+++ b/test/test_mount.py
@@ -54,5 +54,23 @@ class TestAppMounting(ServerTestBase):
self.assertBody('WSGI /test/bar', '/test/test/bar')
+class TestAppMerging(ServerTestBase):
+ def setUp(self):
+ ServerTestBase.setUp(self)
+ self.subapp = bottle.Bottle()
+ @self.subapp.route('/')
+ @self.subapp.route('/test/:test')
+ def test(test='foo'):
+ return test
+
+ def test_merge(self):
+ self.app.merge(self.subapp)
+ self.assertStatus(200, '/')
+ self.assertBody('foo', '/')
+ self.assertStatus(200, '/test/bar')
+ self.assertBody('bar', '/test/bar')
+
+
+
if __name__ == '__main__': #pragma: no cover
unittest.main()