# coding: utf-8 """ Test Results API Get test result metrics for Network and Application Synthetics tests. Generated by OpenAPI Generator (https://openapi-generator.tech) Do not edit the class manually. """ # noqa: E501 import json import unittest import thousandeyes_sdk.test_results.models from .test_utils import assert_constructed_model_matches_example_json from thousandeyes_sdk.test_results.api.web_ftp_server_test_results_api import WebFTPServerTestResultsApi class TestWebFTPServerTestResultsApi(unittest.TestCase): """WebFTPServerTestResultsApi unit test stubs""" def setUp(self) -> None: self.api = WebFTPServerTestResultsApi() def tearDown(self) -> None: pass def test_get_test_ftp_server_results_models_validation(self) -> None: """Test case for get_test_ftp_server_results request and response models""" response_body_json = """ { "test" : { "_links" : { "testResults" : [ { "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/network" }, { "href" : "https://api.thousandeyes.com/v7/test-results/281474976710706/path-vis" } ], "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" } }, "liveShare" : false, "savedEvent" : true, "description" : "ThousandEyes Test", "type" : "agent-to-server", "enabled" : true, "createdDate" : "2022-07-17T22:00:54Z", "createdBy" : "user@user.com", "modifiedDate" : "2022-07-17T22:00:54Z", "interval" : 60, "modifiedBy" : "user@user.com", "testId" : "281474976710706", "alertsEnabled" : true, "testName" : "ThousandEyes Test" }, "endDate" : "2022-07-18T22:00:54Z", "_links" : { "next" : { "hreflang" : "hreflang", "templated" : true, "profile" : "profile", "name" : "name", "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", "type" : "type", "deprecation" : "deprecation", "title" : "title" }, "previous" : { "hreflang" : "hreflang", "templated" : true, "profile" : "profile", "name" : "name", "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", "type" : "type", "deprecation" : "deprecation", "title" : "title" }, "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" } }, "results" : [ { "date" : "2022-07-17T22:00:54Z", "agent" : { "agentId" : "281474976710706", "agentName" : "thousandeyes-stg-va-254", "location" : "San Francisco Bay Area", "countryId" : "US" }, "transferTime" : 99.865, "_links" : { "appLink" : { "hreflang" : "hreflang", "templated" : true, "profile" : "profile", "name" : "name", "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", "type" : "type", "deprecation" : "deprecation", "title" : "title" } }, "negotiationTime" : 503.413, "responseTime" : 0.589, "totalTime" : 705.554, "errorType" : "None", "responseCode" : 226, "dnsTime" : 0.589, "connectTime" : 50.153, "serverIp" : "193.2.1.88", "startTime" : 1384309800, "endTime" : 1384309800, "throughput" : 123, "roundId" : 1384309800, "waitTime" : 52.1, "wireSize" : 22172, "errorDetails" : "Connection error" }, { "date" : "2022-07-17T22:00:54Z", "agent" : { "agentId" : "281474976710706", "agentName" : "thousandeyes-stg-va-254", "location" : "San Francisco Bay Area", "countryId" : "US" }, "transferTime" : 99.865, "_links" : { "appLink" : { "hreflang" : "hreflang", "templated" : true, "profile" : "profile", "name" : "name", "href" : "https://api.thousandeyes.com/v7/link/to/resource/id", "type" : "type", "deprecation" : "deprecation", "title" : "title" } }, "negotiationTime" : 503.413, "responseTime" : 0.589, "totalTime" : 705.554, "errorType" : "None", "responseCode" : 226, "dnsTime" : 0.589, "connectTime" : 50.153, "serverIp" : "193.2.1.88", "startTime" : 1384309800, "endTime" : 1384309800, "throughput" : 123, "roundId" : 1384309800, "waitTime" : 52.1, "wireSize" : 22172, "errorDetails" : "Connection error" } ], "startDate" : "2022-07-17T22:00:54Z" }""" response_loaded_json = json.loads(response_body_json) response_from_json = thousandeyes_sdk.test_results.models.FtpServerTestResults.from_json(response_body_json) assert_constructed_model_matches_example_json(response_from_json, response_loaded_json) if __name__ == '__main__': unittest.main()