Closed ubajze closed 7 years ago
@ubajze The test is failing, as the data returned does not match the models:
-------------------- >> begin captured stdout << ---------------------
key: rtt
model_class: <type 'float'>
data_class: <type 'NoneType'>
key: ip_address
model_class: <type 'unicode'>
data_class: <type 'NoneType'>
key: host_name
model_class: <type 'unicode'>
data_class: <type 'NoneType'>
You should return 0.0 for rtt
and empty string for ip_address
and host_name
as defaults, in case of unresponsive hop.
Just found out about returned data, I was returning None when hop was not responsive... Fixed that in latest commit
You're getting close:
key: ip_address
model_class: <type 'unicode'>
data_class: <type 'str'>
key: host_name
model_class: <type 'unicode'>
data_class: <type 'str'>
Please make sure you return unicode. To make it Py2 and Py3 compatible, cast the datatype using: py23_compat.text_type(ip_address)
everywhere - the same for host_name
.
Finally all checks have passed :)
@ubajze I will try to review this shortly.
I will fix this to work with the new testing framework.
I merged this into my devel branch and fixed the tests to use the new testing framework. I also made a few minor changes.
Closing this PR and will link to new PR.
This PR has been incorporated here:
Adding traceroute method.
I was testing on attached output and it is working fine. Not sure if I hit all corner cases, I was trying to make the output as complex as possible.
Uros