-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
350 additions
and
63 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import icasdk | ||
from icasdk.apis.tags import sample_api | ||
from icasdk.model.sample_paged_list import SamplePagedList | ||
from icasdk.model.problem import Problem | ||
from pprint import pprint | ||
import os | ||
from dotenv import load_dotenv | ||
|
||
|
||
def test_sample_list(): | ||
# Defining the host is optional and defaults to /ica/rest | ||
# See configuration.py for a list of all supported configuration parameters. | ||
load_dotenv() | ||
configuration = icasdk.Configuration(host="https://ica.illumina.com/ica/rest") | ||
|
||
# Configure HTTP basic authorization: BasicAuth | ||
configuration.api_key["ApiKeyAuth"] = os.getenv("APIKEY") | ||
|
||
with icasdk.ApiClient(configuration) as api_client: | ||
# Create an instance of the API class | ||
api_instance = sample_api.SampleApi(api_client) | ||
|
||
# example passing only required values which don't have defaults set | ||
query_params = { | ||
"region": "c39b1feb-3e94-4440-805e-45e0c76462bf", | ||
} | ||
try: | ||
# Retrieve a list of samples. | ||
api_response = api_instance.get_samples( | ||
query_params=query_params, | ||
) | ||
pprint(api_response) | ||
except icasdk.ApiException as e: | ||
print("Exception when calling SampleApi->get_samples: %s\n" % e) | ||
|
||
items = api_response.body["items"] | ||
sampleList = [] | ||
for i in items: | ||
sampleList.append(i.get_item_oapg("id")) | ||
pprint(i.get_item_oapg("id")) | ||
|
||
assert "038eeae2-6e56-43fd-9973-0d2da84283b7" in sampleList | ||
assert api_response.response.status == 200 |
40 changes: 40 additions & 0 deletions
40
test/test_integration/test_get_storage_credentials_list.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import icasdk | ||
from icasdk.apis.tags import storage_credentials_api | ||
from icasdk.model.problem import Problem | ||
from icasdk.model.storage_credential_list import StorageCredentialList | ||
from pprint import pprint | ||
|
||
import os | ||
from dotenv import load_dotenv | ||
|
||
|
||
def test_storage_credential_list(): | ||
# Defining the host is optional and defaults to /ica/rest | ||
# See configuration.py for a list of all supported configuration parameters. | ||
load_dotenv() | ||
configuration = icasdk.Configuration(host="https://ica.illumina.com/ica/rest") | ||
|
||
# Configure HTTP basic authorization: BasicAuth | ||
configuration.api_key["ApiKeyAuth"] = os.getenv("APIKEY") | ||
with icasdk.ApiClient(configuration) as api_client: | ||
# Create an instance of the API class | ||
api_instance = storage_credentials_api.StorageCredentialsApi(api_client) | ||
|
||
# example, this endpoint has no required or optional parameters | ||
try: | ||
# Retrieve a list of storage credentials. | ||
api_response = api_instance.get_storage_credentials() | ||
pprint(api_response) | ||
except icasdk.ApiException as e: | ||
print( | ||
"Exception when calling StorageCredentialsApi->get_storage_credentials: %s\n" | ||
% e | ||
) | ||
|
||
items = api_response.body["items"] | ||
credList = [] | ||
for i in items: | ||
credList.append(i.get_item_oapg("id")) | ||
pprint(i.get_item_oapg("id")) | ||
assert "7f087458-42d3-4ca2-bc96-1de1dbdc0fd9" in credList | ||
assert api_response.response.status == 200 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import icasdk | ||
from icasdk.apis.tags import user_api | ||
from icasdk.model.user_list import UserList | ||
from icasdk.model.problem import Problem | ||
from pprint import pprint | ||
|
||
import os | ||
from dotenv import load_dotenv | ||
|
||
|
||
def test_user_list(): | ||
# Defining the host is optional and defaults to /ica/rest | ||
# See configuration.py for a list of all supported configuration parameters. | ||
load_dotenv() | ||
configuration = icasdk.Configuration(host="https://ica.illumina.com/ica/rest") | ||
|
||
# Configure HTTP basic authorization: BasicAuth | ||
configuration.api_key["ApiKeyAuth"] = os.getenv("APIKEY") | ||
|
||
with icasdk.ApiClient(configuration) as api_client: | ||
# Create an instance of the API class | ||
api_instance = user_api.UserApi(api_client) | ||
|
||
# example passing only optional values | ||
query_params = {} | ||
try: | ||
# Retrieve a list of users. | ||
api_response = api_instance.get_users( | ||
query_params=query_params, | ||
) | ||
pprint(api_response) | ||
except icasdk.ApiException as e: | ||
print("Exception when calling UserApi->get_users: %s\n" % e) | ||
|
||
items = api_response.body["items"] | ||
userList = [] | ||
for i in items: | ||
userList.append(i.get_item_oapg("id")) | ||
pprint(i.get_item_oapg("id")) | ||
assert "47793c21-75a6-3aa8-8147-81b354d0af4d" in userList | ||
assert api_response.response.status == 200 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import icasdk | ||
from icasdk.apis.tags import workgroup_api | ||
from icasdk.model.problem import Problem | ||
from icasdk.model.workgroup_list import WorkgroupList | ||
from pprint import pprint | ||
|
||
import os | ||
from dotenv import load_dotenv | ||
|
||
|
||
def test_user_list(): | ||
# Defining the host is optional and defaults to /ica/rest | ||
# See configuration.py for a list of all supported configuration parameters. | ||
load_dotenv() | ||
configuration = icasdk.Configuration(host="https://ica.illumina.com/ica/rest") | ||
|
||
# Configure HTTP basic authorization: BasicAuth | ||
configuration.api_key["ApiKeyAuth"] = os.getenv("APIKEY") | ||
|
||
with icasdk.ApiClient(configuration) as api_client: | ||
# Create an instance of the API class | ||
api_instance = workgroup_api.WorkgroupApi(api_client) | ||
|
||
# example, this endpoint has no required or optional parameters | ||
try: | ||
# Retrieve a list of workgroups. | ||
api_response = api_instance.get_workgroups() | ||
pprint(api_response) | ||
except icasdk.ApiException as e: | ||
print("Exception when calling WorkgroupApi->get_workgroups: %s\n" % e) | ||
|
||
items = api_response.body["items"] | ||
workgroupList = [] | ||
for i in items: | ||
workgroupList.append(i.get_item_oapg("id")) | ||
pprint(i.get_item_oapg("id")) | ||
assert "00f97a19-02c3-334d-9ee1-083a65901406" in workgroupList | ||
assert api_response.response.status == 200 |
Oops, something went wrong.