当前位置: 首页>>代码示例>>Python>>正文


Python NGSI_v2.NGSI类代码示例

本文整理汇总了Python中tools.NGSI_v2.NGSI的典型用法代码示例。如果您正苦于以下问题:Python NGSI类的具体用法?Python NGSI怎么用?Python NGSI使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了NGSI类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: verify_that_attribute_types_are_returned_in_response

def verify_that_attribute_types_are_returned_in_response(context, types):
    """
    verify that entity types are returned in response
    :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("Verifying that entities types are returned from a request...")
    ngsi = NGSI()
    ngsi.verify_entity_types(types, context.resp)
    __logger__.info("...Verified that entities types are returned from a request...")
开发者ID:PascaleBorscia,项目名称:fiware-orion,代码行数:9,代码来源:get_steps.py

示例2: verify_error_message

def verify_error_message(context):
    """
    verify error response
    :param context: parameters to evaluate. 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("Verifying error message ...")
    ngsi = NGSI()
    ngsi.verify_error_response(context, context.resp)
    __logger__.info("...Verified that error message is the expected")
开发者ID:fiwareulpgcmirror-org,项目名称:context.Orion,代码行数:9,代码来源:general_steps.py

示例3: verify_admin_error

def verify_admin_error(context, error):
    """
    verify admin error message
    :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.
    :param error: error message expected
    """
    __logger__.debug("Verifying the admin error message: %s..." % error)
    ngsi = NGSI()
    ngsi.verify_admin_error(context, error)
    __logger__.info("...Verified that the admin error message is the expected")
开发者ID:Fiware,项目名称:context.Orion,代码行数:10,代码来源:general_steps.py

示例4: verify_that_the_attribute_is_deleted_into_mongo

def verify_that_the_attribute_is_deleted_into_mongo(context):
    """
    verify that the attribute is deleted into mongo
    """
    __logger__.debug("Verifying if the atribute is deleted...")
    mongo = Mongo(host=props_mongo["MONGO_HOST"], port=props_mongo["MONGO_PORT"], user=props_mongo["MONGO_USER"],
                  password=props_mongo["MONGO_PASS"])
    ngsi = NGSI()
    ngsi.verify_attribute_is_deleted(mongo, context.cb.get_entity_context(), context.cb.get_headers())
    __logger__.info("...verified that the attribute is deleted")
开发者ID:digitalilusion,项目名称:fiware-orion,代码行数:10,代码来源:delete_steps.py

示例5: verify_get_all_entities

def verify_get_all_entities(context):
    """
    verify get all entities
    :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("Verifying all entities are returned in get request...")
    queries_parameters = context.cb.get_entities_parameters()
    ngsi = NGSI()
    ngsi.verify_get_all_entities(queries_parameters, context.entities_accumulate, context.resp)
    __logger__.info("...Verified all entities are returned in get request...")
开发者ID:digitalilusion,项目名称:fiware-orion,代码行数:10,代码来源:get_steps.py

示例6: verify_that_entities_are_not_sorted_by_attributes

def verify_that_entities_are_not_sorted_by_attributes(context):
    """
    verify that entities are not sorted by attributes
    :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("Verifying that entities are  not sorted by attributes...")
    queries_parameters = context.cb.get_entities_parameters()
    ngsi = NGSI()
    ngsi.verify_that_entities_are_sorted_by_some_attributes(queries_parameters, context.entities_accumulate, context.resp, False)
    __logger__.debug("Verified that entities are not sorted by attributes...")
开发者ID:Fiware,项目名称:context.Orion,代码行数:10,代码来源:get_steps.py

示例7: verify_error_message

def verify_error_message(context):
    """
    verify error response
    :param context: parameters to evaluate
    """
    global cb, resp
    __logger__.debug("Verifying error message ...")
    ngsi = NGSI()
    ngsi.verify_error_response(context, resp)
    __logger__.info("...Verified that error message is the expected")
开发者ID:JJ,项目名称:fiware-orion,代码行数:10,代码来源:requests.py

示例8: verify_that_the_attribute_value_by_id_is_returned

def verify_that_the_attribute_value_by_id_is_returned(context):
    """
    verify that the attribute value by ID is returned
    :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("Verifying an attribute value by ID returned from a request...")
    entities_context = context.cb.get_entity_context()
    ngsi = NGSI()
    ngsi.verify_an_attribute_value_by_id(entities_context, context.resp)
    __logger__.info("...Verified the attribute value by ID returned from a request...")
开发者ID:PascaleBorscia,项目名称:fiware-orion,代码行数:10,代码来源:get_steps.py

示例9: verify_get_all_entities

def verify_get_all_entities(context):
    """
    verify get all entities
    """
    global cb, resp
    __logger__.debug("Verifying all entities are returned in get request...")
    queries_parameters = cb.get_entities_parameters()
    entities_context = cb.get_entity_context()
    ngsi = NGSI()
    ngsi.verify_get_all_entities(queries_parameters, entities_context, resp)
    __logger__.info("...Verified all entities are returned in get request...")
开发者ID:JJ,项目名称:fiware-orion,代码行数:11,代码来源:requests.py

示例10: verify_that_the_attribute_by_ID_is_returned

def verify_that_the_attribute_by_ID_is_returned(context):
    """
    verify that the attribute by ID is returned
    """
    global cb, resp
    __logger__.debug("Verifying an attribute by ID returned from a request...")
    entities_context = cb.get_entity_context()
    attribute_name_to_request = cb.get_attribute_name_to_request()
    ngsi = NGSI()
    ngsi.verify_an_attribute_by_id(entities_context, resp, attribute_name_to_request)
    __logger__.info("...Verified an attribute by ID returned from a request...")
开发者ID:JJ,项目名称:fiware-orion,代码行数:11,代码来源:requests.py

示例11: verify_that_an_entity_is_updated_in_mongo

def verify_that_an_entity_is_updated_in_mongo(context):
    """
    verify that an entity is updated in mongo
    :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(" >> verifying that an entity is updating in mongo")
    mongo = Mongo(host=props_mongo["MONGO_HOST"], port=props_mongo["MONGO_PORT"], user=props_mongo["MONGO_USER"],
              password=props_mongo["MONGO_PASS"])
    ngsi = NGSI()
    ngsi.verify_entity_updated_in_mongo(mongo, context.cb.get_entity_context(), context.cb.get_headers())
    __logger__.info(" >> verified that an entity is updated in mongo")
开发者ID:NozomiNetworks,项目名称:fiware-orion,代码行数:11,代码来源:create_update_replace_steps.py

示例12: verify_if_the_log_level_is_the_expected

def verify_if_the_log_level_is_the_expected(context, level):
    """
    verify if the log level is the expected

    :param level: log level expected
    :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("Verifying if the log level \"%s\" is the expected in response..." % level)
    ngsi = NGSI()
    ngsi.verify_log_level(context, level)
    __logger__.info("...Verified log level in response")
开发者ID:Fiware,项目名称:context.Orion,代码行数:11,代码来源:general_steps.py

示例13: verify_an_attribute_by_id_in_raw_mode_from_http_response

def verify_an_attribute_by_id_in_raw_mode_from_http_response(context, field_type):
    """
    verify an attribute by ID in raw mode with type in attribute value from http response
    :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.
    :param field_type: field type to verify (bool | int | float | list | dict | str | NoneType)
    """
    __logger__.debug("Verifying an attribute by ID returned in raw mode from http response...")
    entities_context = context.cb.get_entity_context()
    attribute_name_to_request = context.cb.get_attribute_name_to_request()
    ngsi = NGSI()
    ngsi.verify_an_attribute_by_id_in_raw_mode_http_response(entities_context, context.resp, attribute_name_to_request, field_type)
    __logger__.info("...Verified an attribute by ID returned in raw mode from http response...")
开发者ID:NozomiNetworks,项目名称:fiware-orion,代码行数:12,代码来源:get_steps.py

示例14: verify_that_the_entity_by_id_is_returned

def verify_that_the_entity_by_id_is_returned(context):
    """
    verify that the entity by ID is returned
    :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("Verifying an entity by ID returned from a request...")
    queries_parameters = context.cb.get_entities_parameters()
    entities_context = context.cb.get_entity_context()
    entity_id_to_request = context.cb.get_entity_id_to_request()
    ngsi = NGSI()
    ngsi.verify_an_entity_by_id(queries_parameters, entities_context, context.resp, entity_id_to_request)
    __logger__.info("...Verified an entity by ID returned from a request...")
开发者ID:NozomiNetworks,项目名称:fiware-orion,代码行数:12,代码来源:get_steps.py

示例15: verify_http_response_in_raw_mode_witn_type

def verify_http_response_in_raw_mode_witn_type(context, field_type):
    """
    verify http response in raw mode and type in attribute value from http response
    :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.
    :param field_type: field type (bool | int | float | list | dict | str | NoneType)
    """
    global cb, resp
    __logger__.debug("Verifying http response in raw mode from http response...")
    entities_context = context.cb.get_entity_context()
    ngsi = NGSI()
    ngsi.verify_entity_raw_mode_http_response(entities_context, context.resp, field_type)
    __logger__.info("...Verified http response in raw mode from http response...")
开发者ID:NozomiNetworks,项目名称:fiware-orion,代码行数:12,代码来源:get_steps.py


注:本文中的tools.NGSI_v2.NGSI类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。