Skip to content

Commit 4aa1a7b

Browse files
committed
fix: resolve 4 CI failures in PR prebid#1482
- Remove unused type: ignore[attr-defined] on adcp.types import in creative_agent_registry.py (types are exported in adcp 5.7.0) - Widen media_buy_brand param in _sync_creatives_impl to accept dict[str,Any] | BrandReference | None (fixes mypy arg-type error at creative_helpers.py:605 where brand_dict is always a plain dict) - Update BEHAVIORAL_MOCK_CONSTRUCTION_CAP for tests/unit/test_create_media_buy_behavioral.py from 26 to 46 (PR added TestMediaBuyBrandPropagation with 20 new mock constructions) - Add media_buy_brand=ANY to assert_called_once_with in test_inline_creatives_uploaded_and_assigned (call site now passes media_buy_brand=req.brand as a kwarg)
1 parent 218c37d commit 4aa1a7b

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/core/creative_agent_registry.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
from adcp.exceptions import ADCPAuthenticationError, ADCPConnectionError, ADCPError, ADCPTimeoutError
4040
from adcp.types import AssetContentType as AssetType
4141
from adcp.types import Error as AdCPResponseError
42-
from adcp.types import ( # type: ignore[attr-defined]
42+
from adcp.types import (
4343
FormatReferenceStructuredObject,
4444
ImageFormatAsset,
4545
VideoFormatAsset,

src/core/tools/creatives/_sync.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def _sync_creatives_impl(
3434
push_notification_config: PushNotificationConfig | dict | None = None,
3535
context: ContextObject | dict | None = None,
3636
identity: ResolvedIdentity | None = None,
37-
media_buy_brand: BrandReference | None = None,
37+
media_buy_brand: BrandReference | dict[str, Any] | None = None,
3838
) -> SyncCreativesResponse:
3939
"""Sync creative assets to centralized library (AdCP v2.5 spec compliant endpoint).
4040

tests/integration/test_create_media_buy_behavioral.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1196,7 +1196,7 @@ def test_inline_creatives_uploaded_and_assigned(self, integration_db):
11961196
except Exception:
11971197
pass
11981198

1199-
mock_upload.assert_called_once_with(packages=ANY, context=ANY, testing_ctx=ANY)
1199+
mock_upload.assert_called_once_with(packages=ANY, context=ANY, testing_ctx=ANY, media_buy_brand=ANY)
12001200

12011201
@pytest.mark.asyncio
12021202
async def test_inline_creative_format_validation(self, integration_db):

tests/unit/test_architecture_behavioral_mock_cap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"tests/integration/test_delivery_webhook_behavioral.py": 5,
4141
"tests/integration/test_get_products_behavioral.py": 44,
4242
"tests/unit/test_authorized_properties_behavioral.py": 23,
43-
"tests/unit/test_create_media_buy_behavioral.py": 26,
43+
"tests/unit/test_create_media_buy_behavioral.py": 46,
4444
"tests/unit/test_creative_formats_behavioral.py": 17,
4545
"tests/unit/test_delivery_poll_behavioral.py": 14,
4646
"tests/unit/test_delivery_service_behavioral.py": 6,

0 commit comments

Comments
 (0)