How to use the nameko.testing.services.dummy function in nameko

To help you get started, we’ve selected a few nameko examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nameko / nameko-sqlalchemy / test / test_transaction_retry.py View on Github external
        @dummy
        @transaction_retry
        def create_without_context_manager(self):
            session = self.db.get_session()
            session.add(ExampleModel(data='created without context manager'))
            session.commit()
github nameko / nameko-sqlalchemy / test / test_database.py View on Github external
        @dummy
        def write(self, key, value):
            obj = ExampleModel(key=key, value=value)
            self.db.session.add(obj)
            self.db.session.commit()
github nameko / nameko / test / web / test_websocket.py View on Github external
    @dummy
    def list_subscribers(self):
        return self.websocket_hub.subscriptions
github nameko / nameko / test / test_broker.py View on Github external
    @dummy
    def entrypoint(self, arg):
        return self.example_rpc.method(arg)
github nameko / nameko / test / web / test_websocket.py View on Github external
    @dummy
    def unicast(self, target_socket_id, value):
        status = self.websocket_hub.unicast(target_socket_id, 'test_message', {
            'value': value,
        })
        return status
github nameko / nameko / test / utils / test_utils.py View on Github external
            @dummy(sensitive_arguments=['b[foo][1]'])
            def method(self, a, b):
                return {
                    "a": a,
                    "b": b
                }
github nameko / nameko-sqlalchemy / test / test_transaction_retry.py View on Github external
        @dummy
        def get_record_count_retry_inside(self):
            with self.db.get_session() as session:
                @transaction_retry(session=session)
                def foo():
                    return session.query(ExampleModel).count()

                return foo()
github nameko / nameko / test / test_rpc.py View on Github external
            @dummy
            def echo(self, arg):
                return self.server_rpc.echo(arg)
github nameko / nameko / test / web / test_websocket.py View on Github external
    @dummy
    def broadcast(self, value):
        self.websocket_hub.broadcast('test_channel', 'test_message', {
            'value': value,
        })
github nameko / nameko / test / test_messaging.py View on Github external
            @dummy
            def method(self, payload):
                return self.publish(payload, routing_key=queue.name)