thousandeyes-sdk-python/thousandeyes-sdk-connectors/test/test_operation_connectors_api.py
2026-02-03 09:52:22 +00:00

87 lines
3.1 KiB
Python

# coding: utf-8
"""
Integrations API
Manage connectors and operations.
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
import json
import unittest
import thousandeyes_sdk.connectors.models
from .test_utils import assert_constructed_model_matches_example_json
from thousandeyes_sdk.connectors.api.operation_connectors_api import OperationConnectorsApi
class TestOperationConnectorsApi(unittest.TestCase):
"""OperationConnectorsApi unit test stubs"""
def setUp(self) -> None:
self.api = OperationConnectorsApi()
def tearDown(self) -> None:
pass
def test_get_operation_connectors_models_validation(self) -> None:
"""Test case for get_operation_connectors request and response models"""
response_body_json = """
{
"_links" : {
"self" : {
"hreflang" : "hreflang",
"templated" : true,
"profile" : "profile",
"name" : "name",
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
"type" : "type",
"deprecation" : "deprecation",
"title" : "title"
}
},
"items" : [ "ca39314d-eb4f-496f-9435-b5d20b1bfbff", "ca39314d-eb4f-496f-9435-b5d20b1bfbff" ]
}"""
response_loaded_json = json.loads(response_body_json)
response_from_json = thousandeyes_sdk.connectors.models.Assignments.from_json(response_body_json)
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
def test_set_operation_connectors_models_validation(self) -> None:
"""Test case for set_operation_connectors request and response models"""
request_body_json = """
request_loaded_json = json.loads(request_body_json)
request_from_json = thousandeyes_sdk.connectors.models.List[str].from_json(request_body_json)
assert_constructed_model_matches_example_json(request_from_json, request_loaded_json)
response_body_json = """
{
"_links" : {
"self" : {
"hreflang" : "hreflang",
"templated" : true,
"profile" : "profile",
"name" : "name",
"href" : "https://api.thousandeyes.com/v7/link/to/resource/id",
"type" : "type",
"deprecation" : "deprecation",
"title" : "title"
}
},
"items" : [ "ca39314d-eb4f-496f-9435-b5d20b1bfbff", "ca39314d-eb4f-496f-9435-b5d20b1bfbff" ]
}"""
response_loaded_json = json.loads(response_body_json)
response_from_json = thousandeyes_sdk.connectors.models.Assignments.from_json(response_body_json)
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
if __name__ == '__main__':
unittest.main()