Exemplo n.º 1
0
class BingTestCase(_BackendTestCase):
    def setUp(self):
        from geopy.geocoders.bing import Bing
        self.geocoder = Bing(
            format_string='%s',
            api_key=env['BING_KEY']
        )

    def test_reverse(self):
        known_addr = '1067 6th Ave, New York, NY 10018, United States'
        known_coords = (40.75376406311989, -73.98489005863667)
        addr, coords = self.geocoder.reverse(Point(40.753898, -73.985071))
        self.assertEqual(str_coerce(addr), known_addr)
        self.assertAlmostEqual(coords[0], known_coords[0], delta=self.delta_exact)
        self.assertAlmostEqual(coords[1], known_coords[1], delta=self.delta_exact)
Exemplo n.º 2
0
class BingTestCase(_BackendTestCase):
    def setUp(self):
        from geopy.geocoders.bing import Bing
        self.geocoder = Bing(format_string='%s', api_key=env['BING_KEY'])

    def test_reverse(self):
        known_addr = '1067 6th Ave, New York, NY 10018, United States'
        known_coords = (40.75376406311989, -73.98489005863667)
        addr, coords = self.geocoder.reverse(Point(40.753898, -73.985071))
        self.assertEqual(str_coerce(addr), known_addr)
        self.assertAlmostEqual(coords[0],
                               known_coords[0],
                               delta=self.delta_exact)
        self.assertAlmostEqual(coords[1],
                               known_coords[1],
                               delta=self.delta_exact)
Exemplo n.º 3
0
 def setUp(self):
     from geopy.geocoders.bing import Bing
     self.geocoder = Bing(
         format_string='%s',
         api_key=env['BING_KEY']
     )
Exemplo n.º 4
0
 def setUp(self):
     from geopy.geocoders.bing import Bing
     self.geocoder = Bing(
         'Ao8kAepVCp_mQ583XgHg-rga2dwneQ4LtivmtuDj307vGjteiiqfI6ggjmx63wYR')
Exemplo n.º 5
0
 def setUp(self):
     from geopy.geocoders.bing import Bing
     self.geocoder = Bing(format_string='%s', api_key=env['BING_KEY'])