Skip to content

Commit b039655

Browse files
committed
Progress towards usage metric tests
1 parent 8816691 commit b039655

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

src/mock_vws/_mock_web_services_api.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,6 @@ def decorator(method: Callable[..., str]) -> Callable[..., str]:
151151
validate_not_invalid_json,
152152
validate_date,
153153
validate_date_header_given,
154-
validate_auth_header_exists,
155-
set_content_length_header,
156154
]
157155
else:
158156
decorators = [
@@ -176,11 +174,15 @@ def decorator(method: Callable[..., str]) -> Callable[..., str]:
176174
validate_date,
177175
validate_date_header_given,
178176
validate_not_invalid_json,
179-
validate_auth_header_exists,
180-
set_content_length_header,
181177
]
182178

183-
for decorator in decorators:
179+
common_decorators = [
180+
validate_auth_header_exists,
181+
set_content_length_header,
182+
update_request_count,
183+
]
184+
185+
for decorator in decorators + common_decorators:
184186
method = decorator(method)
185187

186188
return method

tests/mock_vws/test_database_summary.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ def test_request_usage(
391391
vuforia_database_keys: VuforiaDatabaseKeys,
392392
) -> None:
393393
"""
394-
TODO
394+
The ``request_usage`` count increases with each request.
395395
"""
396396
response = database_summary(
397397
vuforia_database_keys=vuforia_database_keys,

0 commit comments

Comments
 (0)