Ejemplo n.º 1
0
    def _setUp(self):
        def kernel(config):
            self.hub = MokshaHub(config=config)
            self.a_topic = a_topic = str(uuid4())

        for __setup, name in testutils.make_setup_functions(kernel):
            yield __setup, name
Ejemplo n.º 2
0
    def _setUp(self):
        def kernel(config):
            self.hub = MokshaHub(config=config)
            self.topic = str(uuid4())

        for __setup, name in testutils.make_setup_functions(kernel):
            yield __setup, name
Ejemplo n.º 3
0
    def _setUp(self):
        def kernel(config):
            def app(environ, start_response):
                start_response('200 OK', [('Content-Type', 'text/html')])
                socket = get_moksha_socket(config)
                return map(str, [socket.display()])

            app = make_moksha_middleware(app, config)
            app = make_tw2_middleware(app, config)
            app = webtest.TestApp(app)
            self.app = app

        for _setup, name in testutils.make_setup_functions(kernel):
            yield _setup, name
Ejemplo n.º 4
0
    def _setUp(self):
        def kernel(config):
            def app(environ, start_response):
                start_response('200 OK', [('Content-Type', 'text/html')])
                socket = get_moksha_socket(config)
                return map(str, [socket.display()])

            app = make_moksha_middleware(app, config)
            app = make_tw2_middleware(app, config)
            app = webtest.TestApp(app)
            self.app = app

        for _setup, name in testutils.make_setup_functions(kernel):
            yield _setup, name
Ejemplo n.º 5
0
    def _setUp(self):
        def kernel(config):
            def app(environ, start_response):
                start_response('200 OK', [('Content-Type', 'text/html')])
                class MyWidget(moksha.wsgi.widgets.api.live.LiveWidget):
                    template = "moksha.wsgi.tests.templates.empty"

                    onmessage = 'console.log(json)'
                    topic = 'test'

                    backend = config['moksha.livesocket.backend']

                return map(str, [MyWidget.display()])

            app = make_moksha_middleware(app, config)
            app = make_tw2_middleware(app, config)
            app = webtest.TestApp(app)
            self.app = app

        for _setup, name in testutils.make_setup_functions(kernel):
            yield _setup, name
Ejemplo n.º 6
0
    def _setUp(self):
        def kernel(config):
            def app(environ, start_response):
                start_response('200 OK', [('Content-Type', 'text/html')])

                class MyWidget(moksha.wsgi.widgets.api.live.LiveWidget):
                    template = "moksha.wsgi.tests.templates.empty"

                    onmessage = 'console.log(json)'
                    topic = 'test'

                    backend = config['moksha.livesocket.backend']

                return map(str, [MyWidget.display()])

            app = make_moksha_middleware(app, config)
            app = make_tw2_middleware(app, config)
            app = webtest.TestApp(app)
            self.app = app

        for _setup, name in testutils.make_setup_functions(kernel):
            yield _setup, name