(self)
| 182 | |
| 183 | |
| 184 | def test_apply(self): |
| 185 | class Plugin(object): |
| 186 | def apply(self, func, route): |
| 187 | def wrapper(*a, **ka): |
| 188 | return func(test=route.config['test'], *a, **ka) + '; tail' |
| 189 | return wrapper |
| 190 | def __call__(self, func): |
| 191 | raise AssertionError("Plugins must not be called "\ |
| 192 | "if they implement 'apply'") |
| 193 | self.app.install(Plugin()) |
| 194 | self.assertBody('test:plugin.cfg; tail', '/') |
| 195 | |
| 196 | def test_instance_method_wrapper(self): |
| 197 | class Plugin(object): |
nothing calls this directly
no test coverage detected