Skip to content

Commit 714e99a

Browse files
committed
fix: fmt + don't assert the number of hits
1 parent d80f1c9 commit 714e99a

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

tests/stats/test_stats.py

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,8 @@ def test_grpc_status_code(self):
132132
f"Expected a gRPC stats entry with GRPCStatusCode=0, got: {grpc_stats}"
133133
)
134134

135-
@features.client_side_stats_supported # FIXME: create a new feature ?
135+
136+
@features.client_side_stats_supported # FIXME: create a new feature ?
136137
@scenarios.trace_stats_computation
137138
class Test_Client_Stats_With_Client_Obfuscation:
138139
"""Test client-side stats do the obfuscation before-hand when available"""
@@ -169,21 +170,11 @@ def test_obfuscation(self):
169170
if stat.get("Type") == "sql":
170171
sql_stats.append(stat)
171172

172-
assert obfuscation_header_found, (
173-
"Datadog-Obfuscation-Version header not found on any stats payload"
174-
)
173+
assert obfuscation_header_found, "Datadog-Obfuscation-Version header not found on any stats payload"
175174

176175
assert len(sql_stats) > 0, "Expected at least one SQL stats entry"
177-
total_hits = 0
178176
for stat in sql_stats:
179-
assert stat["Resource"] == want, (
180-
f"Expected obfuscated resource '{want}', got '{stat['Resource']}'"
181-
)
182-
total_hits += stat["Hits"]
183-
184-
assert total_hits == 4, (
185-
f"Expected 4 SQL hits (one per query), got {total_hits}"
186-
)
177+
assert stat["Resource"] == want, f"Expected obfuscated resource '{want}', got '{stat['Resource']}'"
187178

188179

189180
@features.service_override_source

0 commit comments

Comments
 (0)