How to stop http connection with google maps while testing (Python) -


i writing unit tests in python tests functionalities of website. website uses google maps in parts of it. whenever test following in terminal:

..........[2014-06-27 13:20:23,018] [info] - starting new https connection (1): maps.google.com .[2014-06-27 13:20:23,277] [info] - starting new https connection (1): maps.google.com .[2014-06-27 13:20:23,590] [info] - starting new https connection (1): maps.google.com [2014-06-27 13:20:23,811] [info] - starting new https connection (1): maps.google.com .[2014-06-27 13:20:24,061] [info] - starting new https connection (1): maps.google.com .[2014-06-27 13:20:24,384] [info] - starting new https connection (1): maps.google.com [2014-06-27 13:20:24,654] [info] - starting new https connection (1): maps.google.com .... 

i right output , tests run okay, there way stop appearing or close connection while testing (something permanent tests perhaps?)? think can use mocking , testing library, there simpler way?

thanks in advance

if don't want use mocking, write "stub" google maps server. server obeys same google maps api, returns canned data, , runs locally. configure program use 'localhost' vs 'maps.google.com'.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -