iota/adapter/__init__.py
def seed_response(self, command, response):
        # type: (Text, dict) -> MockAdapter
        """
        Sets the response that the adapter will return for the specified
        command.

        You can seed multiple responses per command; the adapter will
        put them into a FIFO queue.  When a request comes in, the
        adapter will pop the corresponding response off of the queue.

        Example:

        .. code-block:: python

            adapter.seed_response('sayHello', {'message': 'Hi!'})
            adapter.seed_response('sayHello', {'message': 'Hello!'})

            adapter.send_request({'command': 'sayHello'})
            # {'message': 'Hi!'}

            adapter.send_request({'command': 'sayHello'})
            # {'message': 'Hello!'}
        """
        if command not in self.responses:
            self.responses[command] = deque()

        self.responses[command].append(response)
        return self
def seed_response(self, command, response):
        # type: (Text, dict) -> MockAdapter
        if command not in self.responses:
            self.responses[command] = deque()

        self.responses[command].append(response)
        return self
def seed_response ( self , command , response ) : # type: (Text, dict) -> MockAdapter if command not in self . responses : self . responses [ command ] = deque ( ) self . responses [ command ] . append ( response ) return self
Sets the response that the adapter will return for the specified
        command.

        You can seed multiple responses per command; the adapter will
        put them into a FIFO queue.  When a request comes in, the
        adapter will pop the corresponding response off of the queue.

        Example:

        .. code-block:: python

            adapter.seed_response('sayHello', {'message': 'Hi!'})
            adapter.seed_response('sayHello', {'message': 'Hello!'})

            adapter.send_request({'command': 'sayHello'})
            # {'message': 'Hi!'}

            adapter.send_request({'command': 'sayHello'})
            # {'message': 'Hello!'}
Sets the response that the adapter will return for the specified command .