def test_rule_match(self): # match must be used inside scope with rw.routing:plugin activated scope = rw.scope.Scope() with scope(): scope.activate(rw.routing.plugin, callback=self.inside_scope) self.wait()
def test_basic(self): scope = rw.scope.Scope() plugin = rw.plugin.Plugin('rw.test') @plugin.init def init(scope): scope['foo'] = 1 with scope(): scope.activate(plugin, callback=self.inside_scope) self.wait()
def test_mount_variables(self): scope = rw.scope.Scope() with scope(): scope.activate(rw.routing.plugin, callback=self.mount_variables) self.wait()