mirror of
https://github.com/thousandeyes/thousandeyes-sdk-python.git
synced 2025-12-06 07:55:31 +00:00
136 lines
5.4 KiB
Python
136 lines
5.4 KiB
Python
# coding: utf-8
|
|
|
|
"""
|
|
Endpoint Tests API
|
|
|
|
Manage endpoint agent dynamic and scheduled tests using the Endpoint Tests API.
|
|
|
|
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
|
|
Do not edit the class manually.
|
|
""" # noqa: E501
|
|
|
|
|
|
import json
|
|
import unittest
|
|
import thousandeyes_sdk.endpoint_tests.models
|
|
|
|
from .test_utils import assert_constructed_model_matches_example_json
|
|
from thousandeyes_sdk.endpoint_tests.api.endpoint_scheduled_tests_api import EndpointScheduledTestsApi
|
|
|
|
|
|
class TestEndpointScheduledTestsApi(unittest.TestCase):
|
|
"""EndpointScheduledTestsApi unit test stubs"""
|
|
|
|
def setUp(self) -> None:
|
|
self.api = EndpointScheduledTestsApi()
|
|
|
|
def tearDown(self) -> None:
|
|
pass
|
|
|
|
def test_get_endpoint_scheduled_tests_models_validation(self) -> None:
|
|
"""Test case for get_endpoint_scheduled_tests request and response models"""
|
|
|
|
response_body_json = """
|
|
{
|
|
"tests" : [ {
|
|
"server" : "www.example.com",
|
|
"isSavedEvent" : false,
|
|
"_links" : {
|
|
"testResults" : [ {
|
|
"href" : "https://api.thousandeyes.com/v7/endpoint/test-results/scheduled-tests/281474976710706/network/filter"
|
|
}, {
|
|
"href" : "https://api.thousandeyes.com/v7/endpoint/test-results/scheduled-tests/281474976710706/pathvis"
|
|
} ],
|
|
"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"
|
|
}
|
|
},
|
|
"isPrioritized" : false,
|
|
"networkMeasurements" : true,
|
|
"type" : "agent-to-server",
|
|
"tcpProbeMode" : "auto",
|
|
"protocol" : "icmp",
|
|
"createdDate" : "2022-07-17T22:00:54Z",
|
|
"ipVersion" : "V4_ONLY",
|
|
"port" : 443,
|
|
"isEnabled" : true,
|
|
"modifiedDate" : "2022-07-17T22:00:54Z",
|
|
"interval" : 60,
|
|
"testId" : "281474976710706",
|
|
"aid" : "1234",
|
|
"agentSelectorConfig" : {
|
|
"agentSelectorType" : "all-agents",
|
|
"maxMachines" : 25
|
|
},
|
|
"hasPathTraceInSession" : true,
|
|
"testName" : "Test name"
|
|
}, {
|
|
"server" : "www.example.com",
|
|
"isSavedEvent" : false,
|
|
"_links" : {
|
|
"testResults" : [ {
|
|
"href" : "https://api.thousandeyes.com/v7/endpoint/test-results/scheduled-tests/281474976710706/network/filter"
|
|
}, {
|
|
"href" : "https://api.thousandeyes.com/v7/endpoint/test-results/scheduled-tests/281474976710706/pathvis"
|
|
} ],
|
|
"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"
|
|
}
|
|
},
|
|
"isPrioritized" : false,
|
|
"networkMeasurements" : true,
|
|
"type" : "agent-to-server",
|
|
"tcpProbeMode" : "auto",
|
|
"protocol" : "icmp",
|
|
"createdDate" : "2022-07-17T22:00:54Z",
|
|
"ipVersion" : "V4_ONLY",
|
|
"port" : 443,
|
|
"isEnabled" : true,
|
|
"modifiedDate" : "2022-07-17T22:00:54Z",
|
|
"interval" : 60,
|
|
"testId" : "281474976710706",
|
|
"aid" : "1234",
|
|
"agentSelectorConfig" : {
|
|
"agentSelectorType" : "all-agents",
|
|
"maxMachines" : 25
|
|
},
|
|
"hasPathTraceInSession" : true,
|
|
"testName" : "Test name"
|
|
} ],
|
|
"_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"
|
|
}
|
|
}
|
|
}"""
|
|
|
|
response_loaded_json = json.loads(response_body_json)
|
|
response_from_json = thousandeyes_sdk.endpoint_tests.models.EndpointTests.from_json(response_body_json)
|
|
assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)
|
|
|
|
|
|
if __name__ == '__main__':
|
|
unittest.main()
|