In case of general error, total service use should be incremented by searches length
This commit is contained in:
@@ -62,7 +62,7 @@ def run_street_point_geocoder(plpy, GD, geocoder, service_manager, username, org
|
||||
service_manager.logger.error('Error trying to bulk geocode street point', sys.exc_info(), data={"username": username, "orgname": orgname})
|
||||
raise Exception('Error trying to bulk geocode street')
|
||||
finally:
|
||||
service_manager.quota_service.increment_total_service_use()
|
||||
service_manager.quota_service.increment_total_service_use(len(searches))
|
||||
|
||||
|
||||
StreetGeocoderSearch = namedtuple('StreetGeocoderSearch', 'id address city state country')
|
||||
|
||||
@@ -26,4 +26,4 @@ class TestRunStreetPointGeocoder(TestCase):
|
||||
None, None, searches)
|
||||
|
||||
quota_service_mock.increment_total_service_use. \
|
||||
assert_called_once_with()
|
||||
assert_called_once_with(len(searches))
|
||||
|
||||
Reference in New Issue
Block a user