コード例 #1
0
    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()
コード例 #2
0
    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()
コード例 #3
0
    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()
コード例 #4
0
 def test_mount_variables(self):
     scope = rw.scope.Scope()
     with scope():
         scope.activate(rw.routing.plugin, callback=self.mount_variables)
     self.wait()
コード例 #5
0
 def test_mount_variables(self):
     scope = rw.scope.Scope()
     with scope():
         scope.activate(rw.routing.plugin, callback=self.mount_variables)
     self.wait()