File tree Expand file tree Collapse file tree 6 files changed +24
-10
lines changed
clients/python/test/test_osparc Expand file tree Collapse file tree 6 files changed +24
-10
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,11 @@ def cfg(faker: Faker) -> osparc.Configuration:
12
12
)
13
13
14
14
15
+ @pytest .fixture
16
+ def api_client (cfg : osparc .Configuration ) -> osparc .ApiClient :
17
+ return osparc .ApiClient (configuration = cfg )
18
+
19
+
15
20
@pytest .fixture
16
21
def dev_mode_enabled (monkeypatch : pytest .MonkeyPatch ) -> None :
17
22
monkeypatch .setenv ("OSPARC_DEV_FEATURES_ENABLED" , "1" )
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ def test_create_jobs_parent_headers(
31
31
create_parent_env : Callable ,
32
32
dev_mode_enabled : None ,
33
33
parent_env : bool ,
34
+ api_client : ApiClient ,
34
35
):
35
36
create_parent_env (parent_env )
36
37
@@ -58,10 +59,10 @@ def check_headers(**kwargs):
58
59
side_effect = lambda study_id , ** kwargs : check_headers (** kwargs ),
59
60
)
60
61
61
- solvers_api = SolversApi ()
62
+ solvers_api = SolversApi (api_client = api_client )
62
63
solvers_api .create_job (solver_key = "mysolver" , version = "1.2.3" , job_inputs = {})
63
64
64
- studies_api = StudiesApi ()
65
+ studies_api = StudiesApi (api_client = api_client )
65
66
studies_api .create_study_job (study_id = faker .uuid4 (), job_inputs = {})
66
67
studies_api .clone_study (study_id = faker .uuid4 ())
67
68
Original file line number Diff line number Diff line change 14
14
15
15
import unittest
16
16
17
- from osparc import FilesApi # noqa: E501
17
+ from osparc import ApiClient , Configuration , FilesApi # noqa: E501
18
18
19
19
20
20
class TestFilesApi (unittest .TestCase ):
21
21
"""FilesApi unit test stubs"""
22
22
23
23
def setUp (self ):
24
- self .api = FilesApi () # noqa: E501
24
+ self .api = FilesApi (
25
+ api_client = ApiClient (configuration = Configuration ())
26
+ ) # noqa: E501
25
27
26
28
def tearDown (self ):
27
29
pass
Original file line number Diff line number Diff line change 14
14
15
15
import unittest
16
16
17
- from osparc import MetaApi # noqa: E501
17
+ from osparc import ApiClient , Configuration , MetaApi # noqa: E501
18
18
19
19
20
20
class TestMetaApi (unittest .TestCase ):
21
21
"""MetaApi unit test stubs"""
22
22
23
23
def setUp (self ):
24
- self .api = MetaApi () # noqa: E501
24
+ self .api = MetaApi (
25
+ api_client = ApiClient (configuration = Configuration ())
26
+ ) # noqa: E501
25
27
26
28
def tearDown (self ):
27
29
pass
Original file line number Diff line number Diff line change 14
14
15
15
import unittest
16
16
17
- from osparc import SolversApi # noqa: E501
17
+ from osparc import ApiClient , Configuration , SolversApi # noqa: E501
18
18
19
19
20
20
class TestSolversApi (unittest .TestCase ):
21
21
"""SolversApi unit test stubs"""
22
22
23
23
def setUp (self ):
24
- self .api = SolversApi () # noqa: E501
24
+ self .api = SolversApi (
25
+ api_client = ApiClient (configuration = Configuration ())
26
+ ) # noqa: E501
25
27
26
28
def tearDown (self ):
27
29
pass
Original file line number Diff line number Diff line change 14
14
15
15
import unittest
16
16
17
- from osparc import UsersApi # noqa: E501
17
+ from osparc import ApiClient , Configuration , UsersApi # noqa: E501
18
18
19
19
20
20
class TestUsersApi (unittest .TestCase ):
21
21
"""UsersApi unit test stubs"""
22
22
23
23
def setUp (self ):
24
- self .api = UsersApi () # noqa: E501
24
+ self .api = UsersApi (
25
+ api_client = ApiClient (configuration = Configuration ())
26
+ ) # noqa: E501
25
27
26
28
def tearDown (self ):
27
29
pass
You can’t perform that action at this time.
0 commit comments