context.resp = context.cb.get_base_request()
    __logger__.info("...Sent a API entry point request: /v2 correctly")


@step(u'send a version request')
def send_a_version_request(context):
    """
    send a version request
    :param context: It’s a clever place where you and behave can store information to share around. It runs at three levels, automatically managed by behave.
    """
    __logger__.debug("Sending a version request...")
    context.props_cb_env = properties_class.read_properties()[CONTEXT_BROKER_ENV]
    context.cb = CB(protocol=context.props_cb_env["CB_PROTOCOL"], host=context.props_cb_env["CB_HOST"], port=context.props_cb_env["CB_PORT"])
    context.resp = context.cb.get_version_request()
    __logger__.info("..Sent a version request correctly")
send_a_version_request = step(u'send a version request')(send_a_version_request)

@step(u'send a statistics request')
def send_a_statistics_request(context):
    """
    send a statistics request
    :param context: It’s a clever place where you and behave can store information to share around. It runs at three levels, automatically managed by behave.
    """
    __logger__.debug("Sending a statistics request...")
    context.props_cb_env = properties_class.read_properties()[CONTEXT_BROKER_ENV]
    context.cb = CB(protocol=context.props_cb_env["CB_PROTOCOL"], host=context.props_cb_env["CB_HOST"], port=context.props_cb_env["CB_PORT"])
    context.resp = context.cb.get_statistics_request()
    __logger__.info("..Sent a statistics request correctly")


@step(u'send a cache statistics request')
Beispiel #2
0
def send_a_version_request(context):
    """
    send a version request
    :param context: It’s a clever place where you and behave can store information to share around. It runs at three levels, automatically managed by behave.
    """
    __logger__.debug("Sending a version request...")
    context.props_cb_env = properties_class.read_properties(
    )[CONTEXT_BROKER_ENV]
    context.cb = CB(protocol=context.props_cb_env["CB_PROTOCOL"],
                    host=context.props_cb_env["CB_HOST"],
                    port=context.props_cb_env["CB_PORT"])
    context.resp = context.cb.get_version_request()
    __logger__.info("..Sent a version request correctly")


send_a_version_request = step(u'send a version request')(
    send_a_version_request)


@step(u'send a statistics request')
def send_a_statistics_request(context):
    """
    send a statistics request
    :param context: It’s a clever place where you and behave can store information to share around. It runs at three levels, automatically managed by behave.
    """
    __logger__.debug("Sending a statistics request...")
    context.props_cb_env = properties_class.read_properties(
    )[CONTEXT_BROKER_ENV]
    context.cb = CB(protocol=context.props_cb_env["CB_PROTOCOL"],
                    host=context.props_cb_env["CB_HOST"],
                    port=context.props_cb_env["CB_PORT"])
    context.resp = context.cb.get_statistics_request()
    """
    send a version request
    :param context: It’s a clever place where you and behave can store information to share around. It runs at three levels, automatically managed by behave.
    """
    __logger__.debug("Sending a version request...")
    context.props_cb_env = properties_class.read_properties()[CONTEXT_BROKER_ENV]
    context.cb = CB(
        protocol=context.props_cb_env["CB_PROTOCOL"],
        host=context.props_cb_env["CB_HOST"],
        port=context.props_cb_env["CB_PORT"],
    )
    context.resp = context.cb.get_version_request()
    __logger__.info("..Sent a version request correctly")


send_a_version_request = step(u"send a version request")(send_a_version_request)


@step(u"send a statistics request")
def send_a_statistics_request(context):
    """
    send a statistics request
    :param context: It’s a clever place where you and behave can store information to share around. It runs at three levels, automatically managed by behave.
    """
    __logger__.debug("Sending a statistics request...")
    context.props_cb_env = properties_class.read_properties()[CONTEXT_BROKER_ENV]
    context.cb = CB(
        protocol=context.props_cb_env["CB_PROTOCOL"],
        host=context.props_cb_env["CB_HOST"],
        port=context.props_cb_env["CB_PORT"],
    )