22
22
23
23
from azure .core .credentials import TokenCredential
24
24
25
+
25
26
class LoadTestingClient : # pylint: disable=client-accepts-api-version-keyword
26
27
"""These APIs allow end users to create, view and run load tests using Azure Load Test Service.
27
28
@@ -42,38 +43,22 @@ class LoadTestingClient: # pylint: disable=client-accepts-api-version-keyword
42
43
:paramtype api_version: str
43
44
"""
44
45
45
- def __init__ (
46
- self ,
47
- endpoint : str ,
48
- credential : "TokenCredential" ,
49
- ** kwargs : Any
50
- ) -> None :
51
- _endpoint = 'https://{Endpoint}'
46
+ def __init__ (self , endpoint : str , credential : "TokenCredential" , ** kwargs : Any ) -> None :
47
+ _endpoint = "https://{Endpoint}"
52
48
self ._config = LoadTestingClientConfiguration (endpoint = endpoint , credential = credential , ** kwargs )
53
49
self ._client = PipelineClient (base_url = _endpoint , config = self ._config , ** kwargs )
54
50
55
51
self ._serialize = Serializer ()
56
52
self ._deserialize = Deserializer ()
57
53
self ._serialize .client_side_validation = False
58
- self .app_component = AppComponentOperations (
59
- self ._client , self ._config , self ._serialize , self ._deserialize
60
- )
61
- self .server_metrics = ServerMetricsOperations (
62
- self ._client , self ._config , self ._serialize , self ._deserialize
63
- )
54
+ self .app_component = AppComponentOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
55
+ self .server_metrics = ServerMetricsOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
64
56
self .test = TestOperations ( # type: ignore # pylint: disable=abstract-class-instantiated
65
57
self ._client , self ._config , self ._serialize , self ._deserialize
66
58
)
67
- self .test_run = TestRunOperations (
68
- self ._client , self ._config , self ._serialize , self ._deserialize
69
- )
70
-
59
+ self .test_run = TestRunOperations (self ._client , self ._config , self ._serialize , self ._deserialize )
71
60
72
- def send_request (
73
- self ,
74
- request : HttpRequest ,
75
- ** kwargs : Any
76
- ) -> HttpResponse :
61
+ def send_request (self , request : HttpRequest , ** kwargs : Any ) -> HttpResponse :
77
62
"""Runs the network request through the client's chained policies.
78
63
79
64
>>> from azure.core.rest import HttpRequest
@@ -93,7 +78,7 @@ def send_request(
93
78
94
79
request_copy = deepcopy (request )
95
80
path_format_arguments = {
96
- "Endpoint" : self ._serialize .url ("self._config.endpoint" , self ._config .endpoint , ' str' , skip_quote = True ),
81
+ "Endpoint" : self ._serialize .url ("self._config.endpoint" , self ._config .endpoint , " str" , skip_quote = True ),
97
82
}
98
83
99
84
request_copy .url = self ._client .format_url (request_copy .url , ** path_format_arguments )
0 commit comments