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 18
18
import openrouteservice
19
19
from openrouteservice .api .directions_service_api import DirectionsServiceApi # noqa: E501
20
20
from openrouteservice .rest import ApiException
21
-
21
+ from openrouteservice import apiClient
22
22
23
23
class TestDirectionsServiceApi (unittest .TestCase ):
24
24
"""DirectionsServiceApi unit test stubs"""
25
25
26
26
def setUp (self ):
27
27
cfg = configparser .ConfigParser ()
28
28
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
32
30
33
31
def tearDown (self ):
34
32
pass
Original file line number Diff line number Diff line change 18
18
import openrouteservice
19
19
from openrouteservice .api .elevation_api import ElevationApi # noqa: E501
20
20
from openrouteservice .rest import ApiException
21
-
21
+ from openrouteservice import apiClient
22
22
23
23
class TestElevationApi (unittest .TestCase ):
24
24
"""ElevationApi unit test stubs"""
25
25
26
26
def setUp (self ):
27
27
cfg = configparser .ConfigParser ()
28
28
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
32
30
33
31
def tearDown (self ):
34
32
pass
Original file line number Diff line number Diff line change 18
18
import openrouteservice
19
19
from openrouteservice .api .geocode_api import GeocodeApi # noqa: E501
20
20
from openrouteservice .rest import ApiException
21
-
21
+ from openrouteservice import apiClient
22
22
23
23
class TestGeocodeApi (unittest .TestCase ):
24
24
"""GeocodeApi unit test stubs"""
25
25
26
26
def setUp (self ):
27
27
cfg = configparser .ConfigParser ()
28
28
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
32
30
33
31
def tearDown (self ):
34
32
pass
Original file line number Diff line number Diff line change 18
18
import openrouteservice
19
19
from openrouteservice .api .isochrones_service_api import IsochronesServiceApi # noqa: E501
20
20
from openrouteservice .rest import ApiException
21
+ from openrouteservice import apiClient
21
22
22
23
23
24
class TestIsochronesServiceApi (unittest .TestCase ):
@@ -26,9 +27,7 @@ class TestIsochronesServiceApi(unittest.TestCase):
26
27
def setUp (self ):
27
28
cfg = configparser .ConfigParser ()
28
29
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
32
31
33
32
def tearDown (self ):
34
33
pass
Original file line number Diff line number Diff line change 18
18
import openrouteservice
19
19
from openrouteservice .api .matrix_service_api import MatrixServiceApi # noqa: E501
20
20
from openrouteservice .rest import ApiException
21
-
21
+ from openrouteservice import apiClient
22
22
23
23
class TestMatrixServiceApi (unittest .TestCase ):
24
24
"""MatrixServiceApi unit test stubs"""
25
25
26
26
def setUp (self ):
27
27
cfg = configparser .ConfigParser ()
28
28
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
32
30
33
31
def tearDown (self ):
34
32
pass
Original file line number Diff line number Diff line change 18
18
import openrouteservice
19
19
from openrouteservice .api .optimization_api import OptimizationApi # noqa: E501
20
20
from openrouteservice .rest import ApiException
21
+ from openrouteservice import apiClient
21
22
22
23
23
24
class TestOptimizationApi (unittest .TestCase ):
@@ -26,9 +27,7 @@ class TestOptimizationApi(unittest.TestCase):
26
27
def setUp (self ):
27
28
cfg = configparser .ConfigParser ()
28
29
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
32
31
33
32
def tearDown (self ):
34
33
pass
Original file line number Diff line number Diff line change 18
18
import openrouteservice as ors
19
19
from openrouteservice .api .pois_api import PoisApi # noqa: E501
20
20
from openrouteservice .rest import ApiException
21
+ from openrouteservice import apiClient
21
22
22
23
23
24
class TestPoisApi (unittest .TestCase ):
@@ -26,9 +27,7 @@ class TestPoisApi(unittest.TestCase):
26
27
def setUp (self ):
27
28
cfg = configparser .ConfigParser ()
28
29
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
32
31
33
32
def tearDown (self ):
34
33
pass
Original file line number Diff line number Diff line change 18
18
import openrouteservice
19
19
from openrouteservice .api .snapping_service_api import SnappingServiceApi # noqa: E501
20
20
from openrouteservice .rest import ApiException
21
+ from openrouteservice import apiClient
21
22
22
23
23
24
class TestSnappingServiceApi (unittest .TestCase ):
@@ -26,9 +27,7 @@ class TestSnappingServiceApi(unittest.TestCase):
26
27
def setUp (self ):
27
28
cfg = configparser .ConfigParser ()
28
29
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
32
31
33
32
def tearDown (self ):
34
33
pass
You can’t perform that action at this time.
0 commit comments