Exemple #1
0
    def test_directions(self):
        googlemaps = GoogleMaps(None)

        filename = os.path.dirname(__file__) + "/directions.json"
        # If this line fails, you need to generate test data using programy.utils.geo.google_geo.GoogleMaps static methods
        self.assertTrue(os.path.isfile(filename))

        googlemaps.set_response_file_for_get_directions_between_addresses(filename)

        directions = googlemaps.get_directions_between_addresses("Edinburgh", "London")
        self.assertIsNotNone(directions)
        self.assertIsInstance(directions, GoogleDirections)
Exemple #2
0
    def test_directions(self):
        googlemaps = GoogleMaps(None)

        directions = googlemaps.get_directions_between_addresses("Edinburgh", "London")
        self.assertIsNotNone(directions)
        self.assertIsInstance(directions, GoogleDirections)