def test_zero_results_handling(self): '''ensure geocoding wrapper gracefully handles zero results returned''' response = GoogleGeocodingResponse(self._open_test_json('zero-results.json')) self.assertEquals(len(response.results),0) self.assertIsNone(response.best_result(),None)
def test_zero_results_handling(self): '''ensure geocoding wrapper gracefully handles zero results returned''' response = GoogleGeocodingResponse( self._open_test_json('zero-results.json')) self.assertEquals(len(response.results), 0) self.assertIsNone(response.best_result(), None)
def _json_to_best_result(self,fn): response = GoogleGeocodingResponse(self._open_test_json(fn)) return response.best_result(wrapped=True)
def _json_to_best_result(self, fn): response = GoogleGeocodingResponse(self._open_test_json(fn)) return response.best_result(wrapped=True)