Added new logger to all the functions

This commit is contained in:
Mario de Frutos
2016-08-01 19:04:56 +02:00
parent 5d5e8d6f9a
commit ed5cf25e9c
37 changed files with 384 additions and 257 deletions

View File

@@ -1,4 +1,5 @@
import unittest
from mock import Mock
from cartodb_services.mapzen import MapzenIsolines
from math import radians, cos, sin, asin, sqrt
@@ -10,6 +11,7 @@ It uses a mocked client, which returns the cost based on a very simple model:
just proportional to the distance from origin to the target point.
"""
class MatrixClientMock():
def __init__(self, speed):
@@ -67,7 +69,7 @@ class MapzenIsolinesTestCase(unittest.TestCase):
def setUp(self):
speed = 4 # in km/h
matrix_client = MatrixClientMock(speed)
self.mapzen_isolines = MapzenIsolines(matrix_client)
self.mapzen_isolines = MapzenIsolines(matrix_client, Mock())
def test_calculate_isochrone(self):
origin = {"lat":40.744014,"lon":-73.990508}