|
10 | 10 | from sentry_sdk.integrations.huey import HueyIntegration |
11 | 11 | from sentry_sdk.traces import SegmentNameSource, SpanStatus |
12 | 12 | from sentry_sdk.utils import parse_version |
13 | | -from tests.integrations.utils import DATA_COLLECTION_QUEUES_CASES_LEGACY |
| 13 | +from tests.integrations.utils import DATA_COLLECTION_QUEUES_CASES |
14 | 14 |
|
15 | 15 | HUEY_VERSION = parse_version(HUEY_VERSION) |
16 | 16 |
|
|
23 | 23 |
|
24 | 24 | @pytest.fixture |
25 | 25 | def init_huey(sentry_init): |
26 | | - def inner(init_kwargs=None): |
| 26 | + def inner(data_collection=None): |
27 | 27 | sentry_init_kwargs = { |
28 | 28 | "integrations": [HueyIntegration()], |
29 | 29 | "traces_sample_rate": 1.0, |
30 | | - "send_default_pii": True, |
31 | 30 | } |
32 | | - sentry_init_kwargs.update(init_kwargs or {}) |
| 31 | + if data_collection is not None: |
| 32 | + sentry_init_kwargs["data_collection"] = data_collection |
33 | 33 | sentry_init(**sentry_init_kwargs) |
34 | 34 |
|
35 | 35 | return MemoryHuey(name="sentry_sdk") |
@@ -204,17 +204,17 @@ def maybe_locked_task(): |
204 | 204 |
|
205 | 205 |
|
206 | 206 | @pytest.mark.parametrize( |
207 | | - "init_kwargs,expected_args,expected_kwargs", |
208 | | - DATA_COLLECTION_QUEUES_CASES_LEGACY, |
| 207 | + "data_collection,expected_args,expected_kwargs", |
| 208 | + DATA_COLLECTION_QUEUES_CASES, |
209 | 209 | ) |
210 | 210 | def test_task_args_kwargs_data_collection( |
211 | 211 | capture_items, |
212 | 212 | init_huey, |
213 | | - init_kwargs, |
| 213 | + data_collection, |
214 | 214 | expected_args, |
215 | 215 | expected_kwargs, |
216 | 216 | ): |
217 | | - huey = init_huey(init_kwargs=init_kwargs) |
| 217 | + huey = init_huey(data_collection=data_collection) |
218 | 218 |
|
219 | 219 | @huey.task() |
220 | 220 | def division(a, b): |
|
0 commit comments