# coding: utf-8

"""
    Tests API

    **Note:** The Page Load Tests, API Tests, and Web Transaction Tests APIs are not available for ThousandEyes for Government instance.  This API allows you to list, create, edit, and delete 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.tests.models

from .test_utils import assert_constructed_model_matches_example_json
from thousandeyes_sdk.tests.api.api_tests_api import APITestsApi


class TestAPITestsApi(unittest.TestCase):
    """APITestsApi unit test stubs"""

    def setUp(self) -> None:
        self.api = APITestsApi()

    def tearDown(self) -> None:
        pass

    def test_create_api_test_models_validation(self) -> None:
        """Test case for create_api_test request and response models"""
        request_body_json = """
                {
                  "clientCertificate" : "-----BEGIN PRIVATE KEY-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END PRIVATE KEY-----\\n-----BEGIN CERTIFICATE-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END CERTIFICATE-----\\n",
                  "mtuMeasurements" : false,
                  "_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"
                    }
                  },
                  "credentials" : [ "3247", "1051" ],
                  "alertRules" : [ "344753", "212697" ],
                  "description" : "ThousandEyes Test",
                  "probeMode" : "auto",
                  "requests" : [ {
                    "headers" : [ {
                      "value" : "keep-alive",
                      "key" : "x-custom-header"
                    }, {
                      "value" : "keep-alive",
                      "key" : "x-custom-header"
                    } ],
                    "variables" : [ {
                      "name" : "myTestName",
                      "value" : "tests[0].name"
                    }, {
                      "name" : "myTestName",
                      "value" : "tests[0].name"
                    } ],
                    "clientId" : "client-id",
                    "tokenUrl" : "https://id.cisco.com/oauth2/default/v1/token",
                    "method" : "get",
                    "verifyCertificate" : false,
                    "body" : "body",
                    "url" : "https://api.thousandeyes.com/v7/status",
                    "password" : "basic_pw123",
                    "bearerToken" : "abcd-1234-...",
                    "scope" : "read, write, deploy",
                    "name" : "Step 1",
                    "waitTimeMs" : 0,
                    "clientAuthentication" : "basic-auth-header",
                    "clientSecret" : "client-secret",
                    "assertions" : [ {
                      "name" : "status-code",
                      "value" : "200",
                      "operator" : "is"
                    }, {
                      "name" : "status-code",
                      "value" : "200",
                      "operator" : "is"
                    } ],
                    "authType" : "none",
                    "collectApiResponse" : true,
                    "username" : "ThousandEyesUserName"
                  }, {
                    "headers" : [ {
                      "value" : "keep-alive",
                      "key" : "x-custom-header"
                    }, {
                      "value" : "keep-alive",
                      "key" : "x-custom-header"
                    } ],
                    "variables" : [ {
                      "name" : "myTestName",
                      "value" : "tests[0].name"
                    }, {
                      "name" : "myTestName",
                      "value" : "tests[0].name"
                    } ],
                    "clientId" : "client-id",
                    "tokenUrl" : "https://id.cisco.com/oauth2/default/v1/token",
                    "method" : "get",
                    "verifyCertificate" : false,
                    "body" : "body",
                    "url" : "https://api.thousandeyes.com/v7/status",
                    "password" : "basic_pw123",
                    "bearerToken" : "abcd-1234-...",
                    "scope" : "read, write, deploy",
                    "name" : "Step 1",
                    "waitTimeMs" : 0,
                    "clientAuthentication" : "basic-auth-header",
                    "clientSecret" : "client-secret",
                    "assertions" : [ {
                      "name" : "status-code",
                      "value" : "200",
                      "operator" : "is"
                    }, {
                      "name" : "status-code",
                      "value" : "200",
                      "operator" : "is"
                    } ],
                    "authType" : "none",
                    "collectApiResponse" : true,
                    "username" : "ThousandEyesUserName"
                  } ],
                  "type" : "api",
                  "usePublicBgp" : true,
                  "enabled" : true,
                  "vaultCredentials" : [ {
                    "secretId" : "f27e85b2-318b-4145-b5aa-c9dc8d8b0819",
                    "target" : "username"
                  }, {
                    "secretId" : "f27e85b2-318b-4145-b5aa-c9dc8d8b0819",
                    "target" : "username"
                  } ],
                  "protocol" : "tcp",
                  "collectProxyNetworkData" : false,
                  "followRedirects" : true,
                  "pathTraceMode" : "classic",
                  "modifiedBy" : "user@user.com",
                  "alertsEnabled" : true,
                  "clientCertDomainsAllowList" : "www.thousandeyes.com",
                  "testName" : "ThousandEyes Test",
                  "numPathTraces" : 3,
                  "bgpMeasurements" : true,
                  "overrideAgentProxy" : false,
                  "predefinedVariables" : [ {
                    "name" : "myUsername",
                    "value" : "ThousandEyesAccountUserName"
                  }, {
                    "name" : "myUsername",
                    "value" : "ThousandEyesAccountUserName"
                  } ],
                  "liveShare" : false,
                  "distributedTracing" : false,
                  "savedEvent" : true,
                  "networkMeasurements" : true,
                  "url" : "www.thousandeyes.com",
                  "labels" : [ "9842", "1283" ],
                  "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ],
                  "agents" : [ {
                    "agentId" : "125",
                    "sourceIpAddress" : "1.1.1.1"
                  }, {
                    "agentId" : "125",
                    "sourceIpAddress" : "1.1.1.1"
                  } ],
                  "timeLimit" : 19,
                  "createdDate" : "2022-07-17T22:00:54Z",
                  "createdBy" : "user@user.com",
                  "randomizedStartTime" : false,
                  "modifiedDate" : "2022-07-17T22:00:54Z",
                  "interval" : 60,
                  "testId" : "281474976710706",
                  "sharedWithAccounts" : [ "1234", "12345" ],
                  "overrideProxyId" : "281474976710706",
                  "sslVersionId" : "0",
                  "targetTime" : 1,
                  "monitors" : [ "17410", "5" ]
                }
                """

        request_loaded_json = json.loads(request_body_json)
        request_from_json = thousandeyes_sdk.tests.models.ApiTestRequest.from_json(request_body_json)
        assert_constructed_model_matches_example_json(request_from_json, request_loaded_json)

        response_body_json = """
                {
                  "clientCertificate" : "-----BEGIN PRIVATE KEY-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END PRIVATE KEY-----\\n-----BEGIN CERTIFICATE-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END CERTIFICATE-----\\n",
                  "mtuMeasurements" : false,
                  "_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"
                    }
                  },
                  "credentials" : [ "3247", "1051" ],
                  "alertRules" : [ {
                    "severity" : "major",
                    "expression" : "((hops((hopDelay >= 100 ms))))",
                    "alertType" : "http-server",
                    "roundsViolatingMode" : "exact",
                    "sensitivityLevel" : "medium",
                    "roundsViolatingOutOf" : 5,
                    "roundsViolatingRequired" : 2,
                    "isDefault" : true,
                    "minimumSourcesPct" : 99,
                    "ruleName" : "The End of the Internet",
                    "minimumSources" : 10,
                    "ruleId" : "127094",
                    "direction" : "to-target"
                  }, {
                    "severity" : "major",
                    "expression" : "((hops((hopDelay >= 100 ms))))",
                    "alertType" : "http-server",
                    "roundsViolatingMode" : "exact",
                    "sensitivityLevel" : "medium",
                    "roundsViolatingOutOf" : 5,
                    "roundsViolatingRequired" : 2,
                    "isDefault" : true,
                    "minimumSourcesPct" : 99,
                    "ruleName" : "The End of the Internet",
                    "minimumSources" : 10,
                    "ruleId" : "127094",
                    "direction" : "to-target"
                  } ],
                  "description" : "ThousandEyes Test",
                  "probeMode" : "auto",
                  "requests" : [ {
                    "headers" : [ {
                      "value" : "keep-alive",
                      "key" : "x-custom-header"
                    }, {
                      "value" : "keep-alive",
                      "key" : "x-custom-header"
                    } ],
                    "variables" : [ {
                      "name" : "myTestName",
                      "value" : "tests[0].name"
                    }, {
                      "name" : "myTestName",
                      "value" : "tests[0].name"
                    } ],
                    "clientId" : "client-id",
                    "tokenUrl" : "https://id.cisco.com/oauth2/default/v1/token",
                    "method" : "get",
                    "verifyCertificate" : false,
                    "body" : "body",
                    "url" : "https://api.thousandeyes.com/v7/status",
                    "password" : "basic_pw123",
                    "bearerToken" : "abcd-1234-...",
                    "scope" : "read, write, deploy",
                    "name" : "Step 1",
                    "waitTimeMs" : 0,
                    "clientAuthentication" : "basic-auth-header",
                    "clientSecret" : "client-secret",
                    "assertions" : [ {
                      "name" : "status-code",
                      "value" : "200",
                      "operator" : "is"
                    }, {
                      "name" : "status-code",
                      "value" : "200",
                      "operator" : "is"
                    } ],
                    "authType" : "none",
                    "collectApiResponse" : true,
                    "username" : "ThousandEyesUserName"
                  }, {
                    "headers" : [ {
                      "value" : "keep-alive",
                      "key" : "x-custom-header"
                    }, {
                      "value" : "keep-alive",
                      "key" : "x-custom-header"
                    } ],
                    "variables" : [ {
                      "name" : "myTestName",
                      "value" : "tests[0].name"
                    }, {
                      "name" : "myTestName",
                      "value" : "tests[0].name"
                    } ],
                    "clientId" : "client-id",
                    "tokenUrl" : "https://id.cisco.com/oauth2/default/v1/token",
                    "method" : "get",
                    "verifyCertificate" : false,
                    "body" : "body",
                    "url" : "https://api.thousandeyes.com/v7/status",
                    "password" : "basic_pw123",
                    "bearerToken" : "abcd-1234-...",
                    "scope" : "read, write, deploy",
                    "name" : "Step 1",
                    "waitTimeMs" : 0,
                    "clientAuthentication" : "basic-auth-header",
                    "clientSecret" : "client-secret",
                    "assertions" : [ {
                      "name" : "status-code",
                      "value" : "200",
                      "operator" : "is"
                    }, {
                      "name" : "status-code",
                      "value" : "200",
                      "operator" : "is"
                    } ],
                    "authType" : "none",
                    "collectApiResponse" : true,
                    "username" : "ThousandEyesUserName"
                  } ],
                  "type" : "api",
                  "usePublicBgp" : true,
                  "enabled" : true,
                  "vaultCredentials" : [ {
                    "secretId" : "f27e85b2-318b-4145-b5aa-c9dc8d8b0819",
                    "target" : "username"
                  }, {
                    "secretId" : "f27e85b2-318b-4145-b5aa-c9dc8d8b0819",
                    "target" : "username"
                  } ],
                  "protocol" : "tcp",
                  "collectProxyNetworkData" : false,
                  "followRedirects" : true,
                  "pathTraceMode" : "classic",
                  "modifiedBy" : "user@user.com",
                  "alertsEnabled" : true,
                  "clientCertDomainsAllowList" : "www.thousandeyes.com",
                  "testName" : "ThousandEyes Test",
                  "numPathTraces" : 3,
                  "bgpMeasurements" : true,
                  "overrideAgentProxy" : false,
                  "predefinedVariables" : [ {
                    "name" : "myUsername",
                    "value" : "ThousandEyesAccountUserName"
                  }, {
                    "name" : "myUsername",
                    "value" : "ThousandEyesAccountUserName"
                  } ],
                  "liveShare" : false,
                  "distributedTracing" : false,
                  "savedEvent" : true,
                  "networkMeasurements" : true,
                  "url" : "www.thousandeyes.com",
                  "labels" : [ {
                    "labelId" : "961",
                    "name" : "Artem label",
                    "isBuiltin" : false
                  }, {
                    "labelId" : "961",
                    "name" : "Artem label",
                    "isBuiltin" : false
                  } ],
                  "tags" : [ {
                    "id" : "5aeab5d5-0d34-4d44-a7ac-fb440185295c",
                    "value" : "San Francisco",
                    "key" : "Location"
                  }, {
                    "id" : "5aeab5d5-0d34-4d44-a7ac-fb440185295c",
                    "value" : "San Francisco",
                    "key" : "Location"
                  } ],
                  "agents" : [ {
                    "agentId" : "281474976710706",
                    "agentType" : "enterprise-cluster",
                    "prefix" : "99.128.0.0/11",
                    "coordinates" : {
                      "latitude" : 37.77493,
                      "longitude" : -122.41942
                    },
                    "agentName" : "thousandeyes-stg-va-254",
                    "networkProviderInfo" : {
                      "asn" : 7018,
                      "name" : "AT&T Services, Inc.",
                      "type" : "isp"
                    },
                    "countryId" : "US",
                    "enabled" : true,
                    "network" : "AT&T Services, Inc. (AS 7018)",
                    "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ],
                    "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ],
                    "location" : "San Francisco Bay Area",
                    "verifySslCertificates" : true
                  }, {
                    "agentId" : "281474976710706",
                    "agentType" : "enterprise-cluster",
                    "prefix" : "99.128.0.0/11",
                    "coordinates" : {
                      "latitude" : 37.77493,
                      "longitude" : -122.41942
                    },
                    "agentName" : "thousandeyes-stg-va-254",
                    "networkProviderInfo" : {
                      "asn" : 7018,
                      "name" : "AT&T Services, Inc.",
                      "type" : "isp"
                    },
                    "countryId" : "US",
                    "enabled" : true,
                    "network" : "AT&T Services, Inc. (AS 7018)",
                    "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ],
                    "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ],
                    "location" : "San Francisco Bay Area",
                    "verifySslCertificates" : true
                  } ],
                  "timeLimit" : 19,
                  "createdDate" : "2022-07-17T22:00:54Z",
                  "createdBy" : "user@user.com",
                  "randomizedStartTime" : false,
                  "modifiedDate" : "2022-07-17T22:00:54Z",
                  "interval" : 60,
                  "testId" : "281474976710706",
                  "sharedWithAccounts" : [ {
                    "name" : "Account name",
                    "aid" : "1234"
                  }, {
                    "name" : "Account name",
                    "aid" : "1234"
                  } ],
                  "overrideProxyId" : "281474976710706",
                  "sslVersionId" : "0",
                  "targetTime" : 1,
                  "monitors" : [ {
                    "monitorType" : "public",
                    "monitorId" : "1234",
                    "monitorName" : "Seattle, WA",
                    "ipAddress" : "4.69.184.193",
                    "countryId" : "GB",
                    "network" : "Level 3 Communications, Inc. (AS 3356)"
                  }, {
                    "monitorType" : "public",
                    "monitorId" : "1234",
                    "monitorName" : "Seattle, WA",
                    "ipAddress" : "4.69.184.193",
                    "countryId" : "GB",
                    "network" : "Level 3 Communications, Inc. (AS 3356)"
                  } ]
                }"""

        response_loaded_json = json.loads(response_body_json)
        response_from_json = thousandeyes_sdk.tests.models.ApiTestResponse.from_json(response_body_json)
        assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)

    def test_delete_api_test_models_validation(self) -> None:
        """Test case for delete_api_test request and response models"""


    def test_get_api_test_models_validation(self) -> None:
        """Test case for get_api_test request and response models"""

        response_body_json = """
                {
                  "clientCertificate" : "-----BEGIN PRIVATE KEY-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END PRIVATE KEY-----\\n-----BEGIN CERTIFICATE-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END CERTIFICATE-----\\n",
                  "mtuMeasurements" : false,
                  "_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"
                    }
                  },
                  "credentials" : [ "3247", "1051" ],
                  "alertRules" : [ {
                    "severity" : "major",
                    "expression" : "((hops((hopDelay >= 100 ms))))",
                    "alertType" : "http-server",
                    "roundsViolatingMode" : "exact",
                    "sensitivityLevel" : "medium",
                    "roundsViolatingOutOf" : 5,
                    "roundsViolatingRequired" : 2,
                    "isDefault" : true,
                    "minimumSourcesPct" : 99,
                    "ruleName" : "The End of the Internet",
                    "minimumSources" : 10,
                    "ruleId" : "127094",
                    "direction" : "to-target"
                  }, {
                    "severity" : "major",
                    "expression" : "((hops((hopDelay >= 100 ms))))",
                    "alertType" : "http-server",
                    "roundsViolatingMode" : "exact",
                    "sensitivityLevel" : "medium",
                    "roundsViolatingOutOf" : 5,
                    "roundsViolatingRequired" : 2,
                    "isDefault" : true,
                    "minimumSourcesPct" : 99,
                    "ruleName" : "The End of the Internet",
                    "minimumSources" : 10,
                    "ruleId" : "127094",
                    "direction" : "to-target"
                  } ],
                  "description" : "ThousandEyes Test",
                  "probeMode" : "auto",
                  "requests" : [ {
                    "headers" : [ {
                      "value" : "keep-alive",
                      "key" : "x-custom-header"
                    }, {
                      "value" : "keep-alive",
                      "key" : "x-custom-header"
                    } ],
                    "variables" : [ {
                      "name" : "myTestName",
                      "value" : "tests[0].name"
                    }, {
                      "name" : "myTestName",
                      "value" : "tests[0].name"
                    } ],
                    "clientId" : "client-id",
                    "tokenUrl" : "https://id.cisco.com/oauth2/default/v1/token",
                    "method" : "get",
                    "verifyCertificate" : false,
                    "body" : "body",
                    "url" : "https://api.thousandeyes.com/v7/status",
                    "password" : "basic_pw123",
                    "bearerToken" : "abcd-1234-...",
                    "scope" : "read, write, deploy",
                    "name" : "Step 1",
                    "waitTimeMs" : 0,
                    "clientAuthentication" : "basic-auth-header",
                    "clientSecret" : "client-secret",
                    "assertions" : [ {
                      "name" : "status-code",
                      "value" : "200",
                      "operator" : "is"
                    }, {
                      "name" : "status-code",
                      "value" : "200",
                      "operator" : "is"
                    } ],
                    "authType" : "none",
                    "collectApiResponse" : true,
                    "username" : "ThousandEyesUserName"
                  }, {
                    "headers" : [ {
                      "value" : "keep-alive",
                      "key" : "x-custom-header"
                    }, {
                      "value" : "keep-alive",
                      "key" : "x-custom-header"
                    } ],
                    "variables" : [ {
                      "name" : "myTestName",
                      "value" : "tests[0].name"
                    }, {
                      "name" : "myTestName",
                      "value" : "tests[0].name"
                    } ],
                    "clientId" : "client-id",
                    "tokenUrl" : "https://id.cisco.com/oauth2/default/v1/token",
                    "method" : "get",
                    "verifyCertificate" : false,
                    "body" : "body",
                    "url" : "https://api.thousandeyes.com/v7/status",
                    "password" : "basic_pw123",
                    "bearerToken" : "abcd-1234-...",
                    "scope" : "read, write, deploy",
                    "name" : "Step 1",
                    "waitTimeMs" : 0,
                    "clientAuthentication" : "basic-auth-header",
                    "clientSecret" : "client-secret",
                    "assertions" : [ {
                      "name" : "status-code",
                      "value" : "200",
                      "operator" : "is"
                    }, {
                      "name" : "status-code",
                      "value" : "200",
                      "operator" : "is"
                    } ],
                    "authType" : "none",
                    "collectApiResponse" : true,
                    "username" : "ThousandEyesUserName"
                  } ],
                  "type" : "api",
                  "usePublicBgp" : true,
                  "enabled" : true,
                  "vaultCredentials" : [ {
                    "secretId" : "f27e85b2-318b-4145-b5aa-c9dc8d8b0819",
                    "target" : "username"
                  }, {
                    "secretId" : "f27e85b2-318b-4145-b5aa-c9dc8d8b0819",
                    "target" : "username"
                  } ],
                  "protocol" : "tcp",
                  "collectProxyNetworkData" : false,
                  "followRedirects" : true,
                  "pathTraceMode" : "classic",
                  "modifiedBy" : "user@user.com",
                  "alertsEnabled" : true,
                  "clientCertDomainsAllowList" : "www.thousandeyes.com",
                  "testName" : "ThousandEyes Test",
                  "numPathTraces" : 3,
                  "bgpMeasurements" : true,
                  "overrideAgentProxy" : false,
                  "predefinedVariables" : [ {
                    "name" : "myUsername",
                    "value" : "ThousandEyesAccountUserName"
                  }, {
                    "name" : "myUsername",
                    "value" : "ThousandEyesAccountUserName"
                  } ],
                  "liveShare" : false,
                  "distributedTracing" : false,
                  "savedEvent" : true,
                  "networkMeasurements" : true,
                  "url" : "www.thousandeyes.com",
                  "labels" : [ {
                    "labelId" : "961",
                    "name" : "Artem label",
                    "isBuiltin" : false
                  }, {
                    "labelId" : "961",
                    "name" : "Artem label",
                    "isBuiltin" : false
                  } ],
                  "tags" : [ {
                    "id" : "5aeab5d5-0d34-4d44-a7ac-fb440185295c",
                    "value" : "San Francisco",
                    "key" : "Location"
                  }, {
                    "id" : "5aeab5d5-0d34-4d44-a7ac-fb440185295c",
                    "value" : "San Francisco",
                    "key" : "Location"
                  } ],
                  "agents" : [ {
                    "agentId" : "281474976710706",
                    "agentType" : "enterprise-cluster",
                    "prefix" : "99.128.0.0/11",
                    "coordinates" : {
                      "latitude" : 37.77493,
                      "longitude" : -122.41942
                    },
                    "agentName" : "thousandeyes-stg-va-254",
                    "networkProviderInfo" : {
                      "asn" : 7018,
                      "name" : "AT&T Services, Inc.",
                      "type" : "isp"
                    },
                    "countryId" : "US",
                    "enabled" : true,
                    "network" : "AT&T Services, Inc. (AS 7018)",
                    "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ],
                    "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ],
                    "location" : "San Francisco Bay Area",
                    "verifySslCertificates" : true
                  }, {
                    "agentId" : "281474976710706",
                    "agentType" : "enterprise-cluster",
                    "prefix" : "99.128.0.0/11",
                    "coordinates" : {
                      "latitude" : 37.77493,
                      "longitude" : -122.41942
                    },
                    "agentName" : "thousandeyes-stg-va-254",
                    "networkProviderInfo" : {
                      "asn" : 7018,
                      "name" : "AT&T Services, Inc.",
                      "type" : "isp"
                    },
                    "countryId" : "US",
                    "enabled" : true,
                    "network" : "AT&T Services, Inc. (AS 7018)",
                    "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ],
                    "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ],
                    "location" : "San Francisco Bay Area",
                    "verifySslCertificates" : true
                  } ],
                  "timeLimit" : 19,
                  "createdDate" : "2022-07-17T22:00:54Z",
                  "createdBy" : "user@user.com",
                  "randomizedStartTime" : false,
                  "modifiedDate" : "2022-07-17T22:00:54Z",
                  "interval" : 60,
                  "testId" : "281474976710706",
                  "sharedWithAccounts" : [ {
                    "name" : "Account name",
                    "aid" : "1234"
                  }, {
                    "name" : "Account name",
                    "aid" : "1234"
                  } ],
                  "overrideProxyId" : "281474976710706",
                  "sslVersionId" : "0",
                  "targetTime" : 1,
                  "monitors" : [ {
                    "monitorType" : "public",
                    "monitorId" : "1234",
                    "monitorName" : "Seattle, WA",
                    "ipAddress" : "4.69.184.193",
                    "countryId" : "GB",
                    "network" : "Level 3 Communications, Inc. (AS 3356)"
                  }, {
                    "monitorType" : "public",
                    "monitorId" : "1234",
                    "monitorName" : "Seattle, WA",
                    "ipAddress" : "4.69.184.193",
                    "countryId" : "GB",
                    "network" : "Level 3 Communications, Inc. (AS 3356)"
                  } ]
                }"""

        response_loaded_json = json.loads(response_body_json)
        response_from_json = thousandeyes_sdk.tests.models.ApiTestResponse.from_json(response_body_json)
        assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)

    def test_get_api_tests_models_validation(self) -> None:
        """Test case for get_api_tests request and response models"""

        response_body_json = """
                {
                  "tests" : [ {
                    "clientCertificate" : "-----BEGIN PRIVATE KEY-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END PRIVATE KEY-----\\n-----BEGIN CERTIFICATE-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END CERTIFICATE-----\\n",
                    "mtuMeasurements" : false,
                    "_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"
                      }
                    },
                    "description" : "ThousandEyes Test",
                    "probeMode" : "auto",
                    "requests" : [ {
                      "headers" : [ {
                        "value" : "keep-alive",
                        "key" : "x-custom-header"
                      }, {
                        "value" : "keep-alive",
                        "key" : "x-custom-header"
                      } ],
                      "variables" : [ {
                        "name" : "myTestName",
                        "value" : "tests[0].name"
                      }, {
                        "name" : "myTestName",
                        "value" : "tests[0].name"
                      } ],
                      "clientId" : "client-id",
                      "tokenUrl" : "https://id.cisco.com/oauth2/default/v1/token",
                      "method" : "get",
                      "verifyCertificate" : false,
                      "body" : "body",
                      "url" : "https://api.thousandeyes.com/v7/status",
                      "password" : "basic_pw123",
                      "bearerToken" : "abcd-1234-...",
                      "scope" : "read, write, deploy",
                      "name" : "Step 1",
                      "waitTimeMs" : 0,
                      "clientAuthentication" : "basic-auth-header",
                      "clientSecret" : "client-secret",
                      "assertions" : [ {
                        "name" : "status-code",
                        "value" : "200",
                        "operator" : "is"
                      }, {
                        "name" : "status-code",
                        "value" : "200",
                        "operator" : "is"
                      } ],
                      "authType" : "none",
                      "collectApiResponse" : true,
                      "username" : "ThousandEyesUserName"
                    }, {
                      "headers" : [ {
                        "value" : "keep-alive",
                        "key" : "x-custom-header"
                      }, {
                        "value" : "keep-alive",
                        "key" : "x-custom-header"
                      } ],
                      "variables" : [ {
                        "name" : "myTestName",
                        "value" : "tests[0].name"
                      }, {
                        "name" : "myTestName",
                        "value" : "tests[0].name"
                      } ],
                      "clientId" : "client-id",
                      "tokenUrl" : "https://id.cisco.com/oauth2/default/v1/token",
                      "method" : "get",
                      "verifyCertificate" : false,
                      "body" : "body",
                      "url" : "https://api.thousandeyes.com/v7/status",
                      "password" : "basic_pw123",
                      "bearerToken" : "abcd-1234-...",
                      "scope" : "read, write, deploy",
                      "name" : "Step 1",
                      "waitTimeMs" : 0,
                      "clientAuthentication" : "basic-auth-header",
                      "clientSecret" : "client-secret",
                      "assertions" : [ {
                        "name" : "status-code",
                        "value" : "200",
                        "operator" : "is"
                      }, {
                        "name" : "status-code",
                        "value" : "200",
                        "operator" : "is"
                      } ],
                      "authType" : "none",
                      "collectApiResponse" : true,
                      "username" : "ThousandEyesUserName"
                    } ],
                    "type" : "api",
                    "usePublicBgp" : true,
                    "enabled" : true,
                    "protocol" : "tcp",
                    "collectProxyNetworkData" : false,
                    "followRedirects" : true,
                    "pathTraceMode" : "classic",
                    "modifiedBy" : "user@user.com",
                    "alertsEnabled" : true,
                    "clientCertDomainsAllowList" : "www.thousandeyes.com",
                    "testName" : "ThousandEyes Test",
                    "numPathTraces" : 3,
                    "bgpMeasurements" : true,
                    "overrideAgentProxy" : false,
                    "predefinedVariables" : [ {
                      "name" : "myUsername",
                      "value" : "ThousandEyesAccountUserName"
                    }, {
                      "name" : "myUsername",
                      "value" : "ThousandEyesAccountUserName"
                    } ],
                    "liveShare" : false,
                    "distributedTracing" : false,
                    "savedEvent" : true,
                    "networkMeasurements" : true,
                    "url" : "www.thousandeyes.com",
                    "timeLimit" : 19,
                    "createdDate" : "2022-07-17T22:00:54Z",
                    "createdBy" : "user@user.com",
                    "randomizedStartTime" : false,
                    "modifiedDate" : "2022-07-17T22:00:54Z",
                    "interval" : 60,
                    "testId" : "281474976710706",
                    "overrideProxyId" : "281474976710706",
                    "sslVersionId" : "0",
                    "targetTime" : 1
                  }, {
                    "clientCertificate" : "-----BEGIN PRIVATE KEY-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END PRIVATE KEY-----\\n-----BEGIN CERTIFICATE-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END CERTIFICATE-----\\n",
                    "mtuMeasurements" : false,
                    "_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"
                      }
                    },
                    "description" : "ThousandEyes Test",
                    "probeMode" : "auto",
                    "requests" : [ {
                      "headers" : [ {
                        "value" : "keep-alive",
                        "key" : "x-custom-header"
                      }, {
                        "value" : "keep-alive",
                        "key" : "x-custom-header"
                      } ],
                      "variables" : [ {
                        "name" : "myTestName",
                        "value" : "tests[0].name"
                      }, {
                        "name" : "myTestName",
                        "value" : "tests[0].name"
                      } ],
                      "clientId" : "client-id",
                      "tokenUrl" : "https://id.cisco.com/oauth2/default/v1/token",
                      "method" : "get",
                      "verifyCertificate" : false,
                      "body" : "body",
                      "url" : "https://api.thousandeyes.com/v7/status",
                      "password" : "basic_pw123",
                      "bearerToken" : "abcd-1234-...",
                      "scope" : "read, write, deploy",
                      "name" : "Step 1",
                      "waitTimeMs" : 0,
                      "clientAuthentication" : "basic-auth-header",
                      "clientSecret" : "client-secret",
                      "assertions" : [ {
                        "name" : "status-code",
                        "value" : "200",
                        "operator" : "is"
                      }, {
                        "name" : "status-code",
                        "value" : "200",
                        "operator" : "is"
                      } ],
                      "authType" : "none",
                      "collectApiResponse" : true,
                      "username" : "ThousandEyesUserName"
                    }, {
                      "headers" : [ {
                        "value" : "keep-alive",
                        "key" : "x-custom-header"
                      }, {
                        "value" : "keep-alive",
                        "key" : "x-custom-header"
                      } ],
                      "variables" : [ {
                        "name" : "myTestName",
                        "value" : "tests[0].name"
                      }, {
                        "name" : "myTestName",
                        "value" : "tests[0].name"
                      } ],
                      "clientId" : "client-id",
                      "tokenUrl" : "https://id.cisco.com/oauth2/default/v1/token",
                      "method" : "get",
                      "verifyCertificate" : false,
                      "body" : "body",
                      "url" : "https://api.thousandeyes.com/v7/status",
                      "password" : "basic_pw123",
                      "bearerToken" : "abcd-1234-...",
                      "scope" : "read, write, deploy",
                      "name" : "Step 1",
                      "waitTimeMs" : 0,
                      "clientAuthentication" : "basic-auth-header",
                      "clientSecret" : "client-secret",
                      "assertions" : [ {
                        "name" : "status-code",
                        "value" : "200",
                        "operator" : "is"
                      }, {
                        "name" : "status-code",
                        "value" : "200",
                        "operator" : "is"
                      } ],
                      "authType" : "none",
                      "collectApiResponse" : true,
                      "username" : "ThousandEyesUserName"
                    } ],
                    "type" : "api",
                    "usePublicBgp" : true,
                    "enabled" : true,
                    "protocol" : "tcp",
                    "collectProxyNetworkData" : false,
                    "followRedirects" : true,
                    "pathTraceMode" : "classic",
                    "modifiedBy" : "user@user.com",
                    "alertsEnabled" : true,
                    "clientCertDomainsAllowList" : "www.thousandeyes.com",
                    "testName" : "ThousandEyes Test",
                    "numPathTraces" : 3,
                    "bgpMeasurements" : true,
                    "overrideAgentProxy" : false,
                    "predefinedVariables" : [ {
                      "name" : "myUsername",
                      "value" : "ThousandEyesAccountUserName"
                    }, {
                      "name" : "myUsername",
                      "value" : "ThousandEyesAccountUserName"
                    } ],
                    "liveShare" : false,
                    "distributedTracing" : false,
                    "savedEvent" : true,
                    "networkMeasurements" : true,
                    "url" : "www.thousandeyes.com",
                    "timeLimit" : 19,
                    "createdDate" : "2022-07-17T22:00:54Z",
                    "createdBy" : "user@user.com",
                    "randomizedStartTime" : false,
                    "modifiedDate" : "2022-07-17T22:00:54Z",
                    "interval" : 60,
                    "testId" : "281474976710706",
                    "overrideProxyId" : "281474976710706",
                    "sslVersionId" : "0",
                    "targetTime" : 1
                  } ],
                  "_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.tests.models.ApiTests.from_json(response_body_json)
        assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)

    def test_update_api_test_models_validation(self) -> None:
        """Test case for update_api_test request and response models"""
        request_body_json = """
                {
                  "clientCertificate" : "-----BEGIN PRIVATE KEY-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END PRIVATE KEY-----\\n-----BEGIN CERTIFICATE-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END CERTIFICATE-----\\n",
                  "mtuMeasurements" : false,
                  "_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"
                    }
                  },
                  "credentials" : [ "3247", "1051" ],
                  "alertRules" : [ "344753", "212697" ],
                  "description" : "ThousandEyes Test",
                  "probeMode" : "auto",
                  "requests" : [ {
                    "headers" : [ {
                      "value" : "keep-alive",
                      "key" : "x-custom-header"
                    }, {
                      "value" : "keep-alive",
                      "key" : "x-custom-header"
                    } ],
                    "variables" : [ {
                      "name" : "myTestName",
                      "value" : "tests[0].name"
                    }, {
                      "name" : "myTestName",
                      "value" : "tests[0].name"
                    } ],
                    "clientId" : "client-id",
                    "tokenUrl" : "https://id.cisco.com/oauth2/default/v1/token",
                    "method" : "get",
                    "verifyCertificate" : false,
                    "body" : "body",
                    "url" : "https://api.thousandeyes.com/v7/status",
                    "password" : "basic_pw123",
                    "bearerToken" : "abcd-1234-...",
                    "scope" : "read, write, deploy",
                    "name" : "Step 1",
                    "waitTimeMs" : 0,
                    "clientAuthentication" : "basic-auth-header",
                    "clientSecret" : "client-secret",
                    "assertions" : [ {
                      "name" : "status-code",
                      "value" : "200",
                      "operator" : "is"
                    }, {
                      "name" : "status-code",
                      "value" : "200",
                      "operator" : "is"
                    } ],
                    "authType" : "none",
                    "collectApiResponse" : true,
                    "username" : "ThousandEyesUserName"
                  }, {
                    "headers" : [ {
                      "value" : "keep-alive",
                      "key" : "x-custom-header"
                    }, {
                      "value" : "keep-alive",
                      "key" : "x-custom-header"
                    } ],
                    "variables" : [ {
                      "name" : "myTestName",
                      "value" : "tests[0].name"
                    }, {
                      "name" : "myTestName",
                      "value" : "tests[0].name"
                    } ],
                    "clientId" : "client-id",
                    "tokenUrl" : "https://id.cisco.com/oauth2/default/v1/token",
                    "method" : "get",
                    "verifyCertificate" : false,
                    "body" : "body",
                    "url" : "https://api.thousandeyes.com/v7/status",
                    "password" : "basic_pw123",
                    "bearerToken" : "abcd-1234-...",
                    "scope" : "read, write, deploy",
                    "name" : "Step 1",
                    "waitTimeMs" : 0,
                    "clientAuthentication" : "basic-auth-header",
                    "clientSecret" : "client-secret",
                    "assertions" : [ {
                      "name" : "status-code",
                      "value" : "200",
                      "operator" : "is"
                    }, {
                      "name" : "status-code",
                      "value" : "200",
                      "operator" : "is"
                    } ],
                    "authType" : "none",
                    "collectApiResponse" : true,
                    "username" : "ThousandEyesUserName"
                  } ],
                  "type" : "api",
                  "usePublicBgp" : true,
                  "enabled" : true,
                  "vaultCredentials" : [ {
                    "secretId" : "f27e85b2-318b-4145-b5aa-c9dc8d8b0819",
                    "target" : "username"
                  }, {
                    "secretId" : "f27e85b2-318b-4145-b5aa-c9dc8d8b0819",
                    "target" : "username"
                  } ],
                  "protocol" : "tcp",
                  "collectProxyNetworkData" : false,
                  "followRedirects" : true,
                  "pathTraceMode" : "classic",
                  "modifiedBy" : "user@user.com",
                  "alertsEnabled" : true,
                  "clientCertDomainsAllowList" : "www.thousandeyes.com",
                  "testName" : "ThousandEyes Test",
                  "numPathTraces" : 3,
                  "bgpMeasurements" : true,
                  "overrideAgentProxy" : false,
                  "predefinedVariables" : [ {
                    "name" : "myUsername",
                    "value" : "ThousandEyesAccountUserName"
                  }, {
                    "name" : "myUsername",
                    "value" : "ThousandEyesAccountUserName"
                  } ],
                  "liveShare" : false,
                  "distributedTracing" : false,
                  "savedEvent" : true,
                  "networkMeasurements" : true,
                  "url" : "www.thousandeyes.com",
                  "labels" : [ "9842", "1283" ],
                  "tags" : [ "c6b78e57-81a2-4c5f-a11a-d96c3c664d55", "ec8e64fb-6f11-485c-a5d5-488098ad626a" ],
                  "agents" : [ {
                    "agentId" : "125",
                    "sourceIpAddress" : "1.1.1.1"
                  }, {
                    "agentId" : "125",
                    "sourceIpAddress" : "1.1.1.1"
                  } ],
                  "timeLimit" : 19,
                  "createdDate" : "2022-07-17T22:00:54Z",
                  "createdBy" : "user@user.com",
                  "randomizedStartTime" : false,
                  "modifiedDate" : "2022-07-17T22:00:54Z",
                  "interval" : 60,
                  "testId" : "281474976710706",
                  "sharedWithAccounts" : [ "1234", "12345" ],
                  "overrideProxyId" : "281474976710706",
                  "sslVersionId" : "0",
                  "targetTime" : 1,
                  "monitors" : [ "17410", "5" ]
                }
                """

        request_loaded_json = json.loads(request_body_json)
        request_from_json = thousandeyes_sdk.tests.models.ApiTestRequest.from_json(request_body_json)
        assert_constructed_model_matches_example_json(request_from_json, request_loaded_json)

        response_body_json = """
                {
                  "clientCertificate" : "-----BEGIN PRIVATE KEY-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END PRIVATE KEY-----\\n-----BEGIN CERTIFICATE-----\\nMIICUTCCAfugAwIBAgIBADANBgkqhkiG9w0BAQQFADBXMQswCQYDVQQGEwJDTjEL\\n-----END CERTIFICATE-----\\n",
                  "mtuMeasurements" : false,
                  "_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"
                    }
                  },
                  "credentials" : [ "3247", "1051" ],
                  "alertRules" : [ {
                    "severity" : "major",
                    "expression" : "((hops((hopDelay >= 100 ms))))",
                    "alertType" : "http-server",
                    "roundsViolatingMode" : "exact",
                    "sensitivityLevel" : "medium",
                    "roundsViolatingOutOf" : 5,
                    "roundsViolatingRequired" : 2,
                    "isDefault" : true,
                    "minimumSourcesPct" : 99,
                    "ruleName" : "The End of the Internet",
                    "minimumSources" : 10,
                    "ruleId" : "127094",
                    "direction" : "to-target"
                  }, {
                    "severity" : "major",
                    "expression" : "((hops((hopDelay >= 100 ms))))",
                    "alertType" : "http-server",
                    "roundsViolatingMode" : "exact",
                    "sensitivityLevel" : "medium",
                    "roundsViolatingOutOf" : 5,
                    "roundsViolatingRequired" : 2,
                    "isDefault" : true,
                    "minimumSourcesPct" : 99,
                    "ruleName" : "The End of the Internet",
                    "minimumSources" : 10,
                    "ruleId" : "127094",
                    "direction" : "to-target"
                  } ],
                  "description" : "ThousandEyes Test",
                  "probeMode" : "auto",
                  "requests" : [ {
                    "headers" : [ {
                      "value" : "keep-alive",
                      "key" : "x-custom-header"
                    }, {
                      "value" : "keep-alive",
                      "key" : "x-custom-header"
                    } ],
                    "variables" : [ {
                      "name" : "myTestName",
                      "value" : "tests[0].name"
                    }, {
                      "name" : "myTestName",
                      "value" : "tests[0].name"
                    } ],
                    "clientId" : "client-id",
                    "tokenUrl" : "https://id.cisco.com/oauth2/default/v1/token",
                    "method" : "get",
                    "verifyCertificate" : false,
                    "body" : "body",
                    "url" : "https://api.thousandeyes.com/v7/status",
                    "password" : "basic_pw123",
                    "bearerToken" : "abcd-1234-...",
                    "scope" : "read, write, deploy",
                    "name" : "Step 1",
                    "waitTimeMs" : 0,
                    "clientAuthentication" : "basic-auth-header",
                    "clientSecret" : "client-secret",
                    "assertions" : [ {
                      "name" : "status-code",
                      "value" : "200",
                      "operator" : "is"
                    }, {
                      "name" : "status-code",
                      "value" : "200",
                      "operator" : "is"
                    } ],
                    "authType" : "none",
                    "collectApiResponse" : true,
                    "username" : "ThousandEyesUserName"
                  }, {
                    "headers" : [ {
                      "value" : "keep-alive",
                      "key" : "x-custom-header"
                    }, {
                      "value" : "keep-alive",
                      "key" : "x-custom-header"
                    } ],
                    "variables" : [ {
                      "name" : "myTestName",
                      "value" : "tests[0].name"
                    }, {
                      "name" : "myTestName",
                      "value" : "tests[0].name"
                    } ],
                    "clientId" : "client-id",
                    "tokenUrl" : "https://id.cisco.com/oauth2/default/v1/token",
                    "method" : "get",
                    "verifyCertificate" : false,
                    "body" : "body",
                    "url" : "https://api.thousandeyes.com/v7/status",
                    "password" : "basic_pw123",
                    "bearerToken" : "abcd-1234-...",
                    "scope" : "read, write, deploy",
                    "name" : "Step 1",
                    "waitTimeMs" : 0,
                    "clientAuthentication" : "basic-auth-header",
                    "clientSecret" : "client-secret",
                    "assertions" : [ {
                      "name" : "status-code",
                      "value" : "200",
                      "operator" : "is"
                    }, {
                      "name" : "status-code",
                      "value" : "200",
                      "operator" : "is"
                    } ],
                    "authType" : "none",
                    "collectApiResponse" : true,
                    "username" : "ThousandEyesUserName"
                  } ],
                  "type" : "api",
                  "usePublicBgp" : true,
                  "enabled" : true,
                  "vaultCredentials" : [ {
                    "secretId" : "f27e85b2-318b-4145-b5aa-c9dc8d8b0819",
                    "target" : "username"
                  }, {
                    "secretId" : "f27e85b2-318b-4145-b5aa-c9dc8d8b0819",
                    "target" : "username"
                  } ],
                  "protocol" : "tcp",
                  "collectProxyNetworkData" : false,
                  "followRedirects" : true,
                  "pathTraceMode" : "classic",
                  "modifiedBy" : "user@user.com",
                  "alertsEnabled" : true,
                  "clientCertDomainsAllowList" : "www.thousandeyes.com",
                  "testName" : "ThousandEyes Test",
                  "numPathTraces" : 3,
                  "bgpMeasurements" : true,
                  "overrideAgentProxy" : false,
                  "predefinedVariables" : [ {
                    "name" : "myUsername",
                    "value" : "ThousandEyesAccountUserName"
                  }, {
                    "name" : "myUsername",
                    "value" : "ThousandEyesAccountUserName"
                  } ],
                  "liveShare" : false,
                  "distributedTracing" : false,
                  "savedEvent" : true,
                  "networkMeasurements" : true,
                  "url" : "www.thousandeyes.com",
                  "labels" : [ {
                    "labelId" : "961",
                    "name" : "Artem label",
                    "isBuiltin" : false
                  }, {
                    "labelId" : "961",
                    "name" : "Artem label",
                    "isBuiltin" : false
                  } ],
                  "tags" : [ {
                    "id" : "5aeab5d5-0d34-4d44-a7ac-fb440185295c",
                    "value" : "San Francisco",
                    "key" : "Location"
                  }, {
                    "id" : "5aeab5d5-0d34-4d44-a7ac-fb440185295c",
                    "value" : "San Francisco",
                    "key" : "Location"
                  } ],
                  "agents" : [ {
                    "agentId" : "281474976710706",
                    "agentType" : "enterprise-cluster",
                    "prefix" : "99.128.0.0/11",
                    "coordinates" : {
                      "latitude" : 37.77493,
                      "longitude" : -122.41942
                    },
                    "agentName" : "thousandeyes-stg-va-254",
                    "networkProviderInfo" : {
                      "asn" : 7018,
                      "name" : "AT&T Services, Inc.",
                      "type" : "isp"
                    },
                    "countryId" : "US",
                    "enabled" : true,
                    "network" : "AT&T Services, Inc. (AS 7018)",
                    "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ],
                    "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ],
                    "location" : "San Francisco Bay Area",
                    "verifySslCertificates" : true
                  }, {
                    "agentId" : "281474976710706",
                    "agentType" : "enterprise-cluster",
                    "prefix" : "99.128.0.0/11",
                    "coordinates" : {
                      "latitude" : 37.77493,
                      "longitude" : -122.41942
                    },
                    "agentName" : "thousandeyes-stg-va-254",
                    "networkProviderInfo" : {
                      "asn" : 7018,
                      "name" : "AT&T Services, Inc.",
                      "type" : "isp"
                    },
                    "countryId" : "US",
                    "enabled" : true,
                    "network" : "AT&T Services, Inc. (AS 7018)",
                    "publicIpAddresses" : [ "192.168.1.78", "f9b2:3a21:f25c:d300:03f4:586d:f8d6:4e1c" ],
                    "ipAddresses" : [ "99.139.65.220", "9bbd:8a0a:a257:5876:288b:6cb2:3f36:64ce" ],
                    "location" : "San Francisco Bay Area",
                    "verifySslCertificates" : true
                  } ],
                  "timeLimit" : 19,
                  "createdDate" : "2022-07-17T22:00:54Z",
                  "createdBy" : "user@user.com",
                  "randomizedStartTime" : false,
                  "modifiedDate" : "2022-07-17T22:00:54Z",
                  "interval" : 60,
                  "testId" : "281474976710706",
                  "sharedWithAccounts" : [ {
                    "name" : "Account name",
                    "aid" : "1234"
                  }, {
                    "name" : "Account name",
                    "aid" : "1234"
                  } ],
                  "overrideProxyId" : "281474976710706",
                  "sslVersionId" : "0",
                  "targetTime" : 1,
                  "monitors" : [ {
                    "monitorType" : "public",
                    "monitorId" : "1234",
                    "monitorName" : "Seattle, WA",
                    "ipAddress" : "4.69.184.193",
                    "countryId" : "GB",
                    "network" : "Level 3 Communications, Inc. (AS 3356)"
                  }, {
                    "monitorType" : "public",
                    "monitorId" : "1234",
                    "monitorName" : "Seattle, WA",
                    "ipAddress" : "4.69.184.193",
                    "countryId" : "GB",
                    "network" : "Level 3 Communications, Inc. (AS 3356)"
                  } ]
                }"""

        response_loaded_json = json.loads(response_body_json)
        response_from_json = thousandeyes_sdk.tests.models.ApiTestResponse.from_json(response_body_json)
        assert_constructed_model_matches_example_json(response_from_json, response_loaded_json)


if __name__ == '__main__':
    unittest.main()
