File tree Expand file tree Collapse file tree 8 files changed +16
-28
lines changed Expand file tree Collapse file tree 8 files changed +16
-28
lines changed Original file line number Diff line number Diff line change 1818import openrouteservice
1919from openrouteservice .api .directions_service_api import DirectionsServiceApi # noqa: E501
2020from openrouteservice .rest import ApiException
21-
21+ from openrouteservice import apiClient
2222
2323class TestDirectionsServiceApi (unittest .TestCase ):
2424 """DirectionsServiceApi unit test stubs"""
2525
2626 def setUp (self ):
2727 cfg = configparser .ConfigParser ()
2828 cfg .read ('tests-config.ini' )
29- configuration = openrouteservice .Configuration ()
30- configuration .api_key ['Authorization' ] = cfg ['ORS' ]['apiKey' ]
31- self .api = DirectionsServiceApi (openrouteservice .ApiClient (configuration )) # noqa: E501
29+ self .api = DirectionsServiceApi (apiClient (cfg ['ORS' ]['apiKey' ])) # noqa: E501
3230
3331 def tearDown (self ):
3432 pass
Original file line number Diff line number Diff line change 1818import openrouteservice
1919from openrouteservice .api .elevation_api import ElevationApi # noqa: E501
2020from openrouteservice .rest import ApiException
21-
21+ from openrouteservice import apiClient
2222
2323class TestElevationApi (unittest .TestCase ):
2424 """ElevationApi unit test stubs"""
2525
2626 def setUp (self ):
2727 cfg = configparser .ConfigParser ()
2828 cfg .read ('tests-config.ini' )
29- configuration = openrouteservice .Configuration ()
30- configuration .api_key ['Authorization' ] = cfg ['ORS' ]['apiKey' ]
31- self .api = ElevationApi (openrouteservice .ApiClient (configuration )) # noqa: E501
29+ self .api = ElevationApi (apiClient (cfg ['ORS' ]['apiKey' ])) # noqa: E501
3230
3331 def tearDown (self ):
3432 pass
Original file line number Diff line number Diff line change 1818import openrouteservice
1919from openrouteservice .api .geocode_api import GeocodeApi # noqa: E501
2020from openrouteservice .rest import ApiException
21-
21+ from openrouteservice import apiClient
2222
2323class TestGeocodeApi (unittest .TestCase ):
2424 """GeocodeApi unit test stubs"""
2525
2626 def setUp (self ):
2727 cfg = configparser .ConfigParser ()
2828 cfg .read ('tests-config.ini' )
29- configuration = openrouteservice .Configuration ()
30- configuration .api_key ['Authorization' ] = cfg ['ORS' ]['apiKey' ]
31- self .api = GeocodeApi (openrouteservice .ApiClient (configuration )) # noqa: E501
29+ self .api = GeocodeApi (apiClient (cfg ['ORS' ]['apiKey' ])) # noqa: E501
3230
3331 def tearDown (self ):
3432 pass
Original file line number Diff line number Diff line change 1818import openrouteservice
1919from openrouteservice .api .isochrones_service_api import IsochronesServiceApi # noqa: E501
2020from openrouteservice .rest import ApiException
21+ from openrouteservice import apiClient
2122
2223
2324class TestIsochronesServiceApi (unittest .TestCase ):
@@ -26,9 +27,7 @@ class TestIsochronesServiceApi(unittest.TestCase):
2627 def setUp (self ):
2728 cfg = configparser .ConfigParser ()
2829 cfg .read ('tests-config.ini' )
29- configuration = openrouteservice .Configuration ()
30- configuration .api_key ['Authorization' ] = cfg ['ORS' ]['apiKey' ]
31- self .api = IsochronesServiceApi (openrouteservice .ApiClient (configuration )) # noqa: E501
30+ self .api = IsochronesServiceApi (apiClient (cfg ['ORS' ]['apiKey' ])) # noqa: E501
3231
3332 def tearDown (self ):
3433 pass
Original file line number Diff line number Diff line change 1818import openrouteservice
1919from openrouteservice .api .matrix_service_api import MatrixServiceApi # noqa: E501
2020from openrouteservice .rest import ApiException
21-
21+ from openrouteservice import apiClient
2222
2323class TestMatrixServiceApi (unittest .TestCase ):
2424 """MatrixServiceApi unit test stubs"""
2525
2626 def setUp (self ):
2727 cfg = configparser .ConfigParser ()
2828 cfg .read ('tests-config.ini' )
29- configuration = openrouteservice .Configuration ()
30- configuration .api_key ['Authorization' ] = cfg ['ORS' ]['apiKey' ]
31- self .api = MatrixServiceApi (openrouteservice .ApiClient (configuration )) # noqa: E501
29+ self .api = MatrixServiceApi (apiClient (cfg ['ORS' ]['apiKey' ])) # noqa: E501
3230
3331 def tearDown (self ):
3432 pass
Original file line number Diff line number Diff line change 1818import openrouteservice
1919from openrouteservice .api .optimization_api import OptimizationApi # noqa: E501
2020from openrouteservice .rest import ApiException
21+ from openrouteservice import apiClient
2122
2223
2324class TestOptimizationApi (unittest .TestCase ):
@@ -26,9 +27,7 @@ class TestOptimizationApi(unittest.TestCase):
2627 def setUp (self ):
2728 cfg = configparser .ConfigParser ()
2829 cfg .read ('tests-config.ini' )
29- configuration = openrouteservice .Configuration ()
30- configuration .api_key ['Authorization' ] = cfg ['ORS' ]['apiKey' ]
31- self .api = OptimizationApi (openrouteservice .ApiClient (configuration )) # noqa: E501
30+ self .api = OptimizationApi (apiClient (cfg ['ORS' ]['apiKey' ])) # noqa: E501
3231
3332 def tearDown (self ):
3433 pass
Original file line number Diff line number Diff line change 1818import openrouteservice as ors
1919from openrouteservice .api .pois_api import PoisApi # noqa: E501
2020from openrouteservice .rest import ApiException
21+ from openrouteservice import apiClient
2122
2223
2324class TestPoisApi (unittest .TestCase ):
@@ -26,9 +27,7 @@ class TestPoisApi(unittest.TestCase):
2627 def setUp (self ):
2728 cfg = configparser .ConfigParser ()
2829 cfg .read ('tests-config.ini' )
29- configuration = ors .Configuration ()
30- configuration .api_key ['Authorization' ] = cfg ['ORS' ]['apiKey' ]
31- self .api = PoisApi (ors .ApiClient (configuration )) # noqa: E501
30+ self .api = PoisApi (apiClient (cfg ['ORS' ]['apiKey' ])) # noqa: E501
3231
3332 def tearDown (self ):
3433 pass
Original file line number Diff line number Diff line change 1818import openrouteservice
1919from openrouteservice .api .snapping_service_api import SnappingServiceApi # noqa: E501
2020from openrouteservice .rest import ApiException
21+ from openrouteservice import apiClient
2122
2223
2324class TestSnappingServiceApi (unittest .TestCase ):
@@ -26,9 +27,7 @@ class TestSnappingServiceApi(unittest.TestCase):
2627 def setUp (self ):
2728 cfg = configparser .ConfigParser ()
2829 cfg .read ('tests-config.ini' )
29- configuration = openrouteservice .Configuration ()
30- configuration .api_key ['Authorization' ] = cfg ['ORS' ]['apiKey' ]
31- self .api = SnappingServiceApi (openrouteservice .ApiClient (configuration )) # noqa: E501
30+ self .api = SnappingServiceApi (apiClient (cfg ['ORS' ]['apiKey' ])) # noqa: E501
3231
3332 def tearDown (self ):
3433 pass
You can’t perform that action at this time.
0 commit comments