Resolve TODO
pooja1pathak opened this issue · 3 comments
Resolve TODO:
Hi @c0c0n3
I think this factor out can not be solved, it looks like gen_entity() in test_timescale_insert module in translators.tests.
but there are lot of differences in attributes, some of the attributes in reporter.tests.test_timescale_types.py not in other gen_entity()
TIMEX_ATTR_NAME: {
'type': NGSI_DATETIME,
'value': timex
},
BOOL_ATTR_NAME: {
'type': 'Boolean',
'value': bool_v
},
INT_ATTR_NAME: {
'type': 'Integer',
'value': int_v
},
NUM_ATTR_NAME: {
'type': 'Number',
'value': num_v
},
TEXT_ATTR_NAME: {
'type': NGSI_TEXT,
'value': text_v
},
ARR_ATTR_NAME: {
'type': 'Array',
'value': array_v
},
SV_ATTR_NAME: {
'type': NGSI_STRUCTURED_VALUE,
'value': structured_v
},
GEOJ_ATTR_NAME: {
'type': NGSI_GEOJSON,
'value': geoj_v
},
PT_ATTR_NAME: {
'type': SlfPoint.ngsi_type(),
'value': slf_point_v
},
LINE_ATTR_NAME: {
'type': SlfLine.ngsi_type(),
'value': slf_line_v
},
POLY_ATTR_NAME: {
'type': SlfPolygon.ngsi_type(),
'value': slf_polygon_v
},
BOX_ATTR_NAME: {
'type': SlfBox.ngsi_type(),
'value': slf_box_v
}
These attributes are not there in gen_entity of translators.tests.test_timescale_insert()
can you Please suggest me a way?
@NEC-Vishal I totally agree w/ your analysis, thanks for that. It looks like the code has diverged since that TODO was written. I think the only sane thing to do at this stage is to keep things as they are? If you agree we could ditch #685 and close this issue.
@NEC-Vishal I closed #685 and going to close this issue, if you don't agree, please reopen :-)