File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ async def replaced_safesearch(self) -> int:
45
45
async def avg_processing_time (self ) -> float :
46
46
"""Return avarage processing time of DNS queries (in ms)."""
47
47
response = await self ._adguard ._request ("stats" )
48
- return round (response ["avg_processing_time" ] * 100 , 2 )
48
+ return round (response ["avg_processing_time" ] * 1000 , 2 )
49
49
50
50
async def period (self ) -> int :
51
51
"""Return the time period to keep data (in days)."""
Original file line number Diff line number Diff line change @@ -153,13 +153,13 @@ async def test_avg_processing_time(aresponses):
153
153
aresponses .Response (
154
154
status = 200 ,
155
155
headers = {"Content-Type" : "application/json" },
156
- text = '{"avg_processing_time": 0.0314 }' ,
156
+ text = '{"avg_processing_time": 0.03141 }' ,
157
157
),
158
158
)
159
159
async with aiohttp .ClientSession () as session :
160
160
adguard = AdGuardHome ("example.com" , session = session )
161
161
result = await adguard .stats .avg_processing_time ()
162
- assert result == 3.14
162
+ assert result == 31.41
163
163
164
164
165
165
@pytest .mark .asyncio
@@ -215,10 +215,10 @@ async def test_content_type_workarond(aresponses):
215
215
aresponses .Response (
216
216
status = 200 ,
217
217
headers = {"Content-Type" : "text/plain; charset=utf-8" },
218
- text = '{"avg_processing_time": 0.0314 }' ,
218
+ text = '{"avg_processing_time": 0.03141 }' ,
219
219
),
220
220
)
221
221
async with aiohttp .ClientSession () as session :
222
222
adguard = AdGuardHome ("example.com" , session = session )
223
223
result = await adguard .stats .avg_processing_time ()
224
- assert result == 3.14
224
+ assert result == 31.41
You can’t perform that action at this time.
0 commit comments