fix: return flag_error value

pull/29/head
Sami Mokaddem 2017-12-07 13:23:22 +01:00
parent 139bd993a2
commit f5757362db
1 changed files with 3 additions and 1 deletions

View File

@ -33,7 +33,7 @@ def test():
supposed_ip = '8.8.8.8'
geo_helper.getCoordFromIpAndPublish(supposed_ip, categ)
rep = geo_helper.getTopCoord(today)
excpected_result = [['{"lat": 37.751, "lon": -97.822}', 1.0]]
excpected_result = [['{"lat": 37.751, "lon": -97.822, "categ": "Network Activity", "value": "8.8.8.8"}', 1.0]]
if rep != excpected_result:
print('ip to coord result not matching')
flag_error = True
@ -70,6 +70,8 @@ def test():
print('Phone to coord result not matching')
flag_error = True
return flag_error
wipeRedis()
if test():
wipeRedis()