def assert_has_subscription(self, sender, send_port, receiver, receive_port):
        """assert that the given sender block has a subscription for the given
        receiver block on the appropriate send and receive ports

        :param sender: a block sptr to the message sender
        :param string send_port: the port messages are being sent on
        :param receiver: a block sptr to the message receiver
        :param string receive_port: the port messages are being received on
        """
        subs = sender.message_subscribers(pmt.intern(send_port))
        self.assertTrue(
            pmt.list_has(subs, pmt.cons(pmt.intern(receiver.to_basic_block().alias()), pmt.intern(receive_port)))
        )
    def assert_has_subscription(self, sender, send_port, receiver,
            receive_port):
        """assert that the given sender block has a subscription for the given
        receiver block on the appropriate send and receive ports

        :param sender: a block sptr to the message sender
        :param string send_port: the port messages are being sent on
        :param receiver: a block sptr to the message receiver
        :param string receive_port: the port messages are being received on
        """
        subs = sender.message_subscribers(pmt.intern(send_port))
        self.assertTrue(pmt.list_has(subs, pmt.cons(
            pmt.intern(receiver.to_basic_block().alias()),
            pmt.intern(receive_port))))