thousandeyes-sdk-python/test_results/test/test_sip_server_test_result.py
2024-05-02 16:26:53 +01:00

132 lines
5.0 KiB
Python

# coding: utf-8
"""
Test Results API
Get test result metrics for Cloud and Enterprise Agent tests.
The version of the OpenAPI document: 7.0.0
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501
import unittest
from test_results.models.sip_server_test_result import SipServerTestResult
class TestSipServerTestResult(unittest.TestCase):
"""SipServerTestResult unit test stubs"""
def setUp(self):
pass
def tearDown(self):
pass
def make_instance(self, include_optional) -> SipServerTestResult:
"""Test SipServerTestResult
include_option is a boolean, when False only required
params are included, when True both required and
optional params are included """
# uncomment below to create an instance of `SipServerTestResult`
"""
model = SipServerTestResult()
if include_optional:
return SipServerTestResult(
var_date = '2022-07-17T22:00:54Z',
round_id = 1384309800,
links = {appLink={href=https://app.thousandeyes.com/view/tests?__a=105&testId=195&roundId=1692916680&agentId=125}},
start_time = 1384309800,
end_time = 1384309800,
server_ip = '193.2.1.88',
agent = test_results.models.agent.Agent(
agent_id = '281474976710706',
agent_name = 'thousandeyes-stg-va-254',
country_id = 'US',
location = 'San Francisco Bay Area', ),
availability = 100.0,
connect_time = 5,
dns_time = 2,
invite_time = 10,
options_time = 17,
num_redirects = 0,
options_request = 'OPTIONS sip:6054@voice.sfo2.notarealco.com SIP/2.0
Via: SIP/2.0/TCP 38.140.61.68:55431;branch=z9hG4bKRTzPzMoVh0;rport
From: <sip:6054@voice.sfo2.notarealco.com>;tag=cGaJDNKQFE
To: <sip:6054@voice.sfo2.notarealco.com>
Call-ID: oO9WaL3av8@38.140.61.68
CSeq: 3 OPTIONS
Contact: <sip:6054@38.140.61.68:55431;transport=tcp>
User-Agent: ThousandEyes Test Call
Allow: INVITE, ACK, CANCEL, BYE
Supported: outbound, path
Max-Forwards: 70
Expires: 60
Content-Length: 0
OPTIONS sip:6054@voice.sfo2.notarealco.com SIP/2.0
Via: SIP/2.0/TCP 38.140.61.68:55431;branch=z9hG4bKRTzPzMoVh0;rport
From: <sip:6054@voice.sfo2.notarealco.com>;tag=cGaJDNKQFE
To: <sip:6054@voice.sfo2.notarealco.com>
Call-ID: oO9WaL3av8@38.140.61.68
CSeq: 4 OPTIONS
Contact: <sip:6054@38.140.61.68:55431;transport=tcp>
Authorization: Digest username="al6054", realm="asterisk", nonce="1598728080/4e3bef2c789bdfa45ce9123221e08c8f", uri="sip:6054@voice.sfo2.notarealco.com", response="83c538a39ff766cf75ffd1d62317b442", algorithm=MD5, cnonce="0a4f113b", opaque="748ffa241d840721", qop=auth, nc=00000001
User-Agent: ThousandEyes Test Call
Allow: INVITE, ACK, CANCEL, BYE
Supported: outbound, path
Max-Forwards: 70
Expires: 60
Content-Length: 0
',
options_response = 'SIP/2.0 401 Unauthorized
Via: SIP/2.0/TCP 38.140.61.68:55431;rport=55431;received=38.140.61.68;branch=z9hG4bKRTzPzMoVh0
Call-ID: oO9WaL3av8@38.140.61.68
From: <sip:6054@voice.sfo2.notarealco.com>;tag=cGaJDNKQFE
To: <sip:6054@voice.sfo2.notarealco.com>;tag=z9hG4bKRTzPzMoVh0
CSeq: 3 OPTIONS
WWW-Authenticate: Digest realm="asterisk",nonce="1598728080/4e3bef2c789bdfa45ce9123221e08c8f",opaque="748ffa241d840721",algorithm=md5,qop="auth"
Server: Asterisk PBX 16.4.0
Content-Length: 0
SIP/2.0 200 OK
Via: SIP/2.0/TCP 38.140.61.68:55431;rport=55431;received=38.140.61.68;branch=z9hG4bKRTzPzMoVh0
Call-ID: oO9WaL3av8@38.140.61.68
From: <sip:6054@voice.sfo2.notarealco.com>;tag=cGaJDNKQFE
To: <sip:6054@voice.sfo2.notarealco.com>;tag=z9hG4bKRTzPzMoVh0
CSeq: 4 OPTIONS
Accept: application/xpidf+xml, application/cpim-pidf+xml, application/simple-message-summary, application/pidf+xml, application/dialog-info+xml, application/simple-message-summary, application/pidf+xml, application/dialog-info+xml, application/sdp, message/sipfrag;version=2.0
Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER
Supported: 100rel, timer, replaces, norefersub
Accept-Encoding: text/plain
Accept-Language: en
Server: Asterisk PBX 16.4.0
Content-Length: 0
',
register_time = 21,
response_code = 200,
response_time = 12,
total_time = 40,
wait_time = 5,
error_type = 'none',
problem_detail = ''
)
else:
return SipServerTestResult(
)
"""
def testSipServerTestResult(self):
"""Test SipServerTestResult"""
# inst_req_only = self.make_instance(include_optional=False)
# inst_req_and_optional = self.make_instance(include_optional=True)
if __name__ == '__main__':
unittest.main()