def retrieve_measurement_fields(): all_measurements_fields = {} measurements_field_keys = InfluxDBAdmin.show_field_keys() measurements_tag_keys = InfluxDBAdmin.show_tag_keys() for measurement_field_keys in measurements_field_keys: measurement_name, fields = list(measurement_field_keys.items())[0] all_measurements_fields.setdefault(measurement_name, []) for field in fields: field_key = field['fieldKey'] field_type = field['fieldType'] field_tuple = (field_key, FIELD_TYPE_ATTRIBUTE_MAP[field_type]) all_measurements_fields[measurement_name].append(field_tuple) for measurement_tag_keys in measurements_tag_keys: measurement_name, tags = list(measurement_tag_keys.items())[0] all_measurements_fields.setdefault(measurement_name, []) for tag in tags: tag_key = tag['tagKey'] tag_tuple = (tag_key, TAG_CLASSNAME) all_measurements_fields[measurement_name].append(tag_tuple) return all_measurements_fields
def test_show_tag_keys_with_measurements_success(self): res = InfluxDBAdmin.show_tag_keys(measurements=['param1', 'param2']) assert res is not None
def test_show_tag_keys_success(self): res = InfluxDBAdmin.show_tag_keys() assert res is not None