MCPcopy Index your code
hub / github.com/bottlepy/bottle / test_plugin_oder

Method test_plugin_oder

test/test_plugins.py:90–101  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

88 self.assertBody('plugin;foo', '/b')
89
90 def test_plugin_oder(self):
91 self.app.install(MyPlugin()).add_content = ';global-1'
92 self.app.install(MyPlugin()).add_content = ';global-2'
93 l1 = MyPlugin()
94 l1.add_content = ';local-1'
95 l2 = MyPlugin()
96 l2.add_content = ';local-2'
97 @self.app.route('/a')
98 @self.app.route('/b', apply=[l1, l2])
99 def a(): return 'plugin'
100 self.assertBody('plugin;global-2;global-1', '/a')
101 self.assertBody('plugin;local-2;local-1;global-2;global-1', '/b')
102
103 def test_skip_by_instance(self):
104 g1 = self.app.install(MyPlugin())

Callers

nothing calls this directly

Calls 3

MyPluginClass · 0.85
installMethod · 0.80
assertBodyMethod · 0.80

Tested by

no test coverage detected