From 74e9288bd6fc52fd78cec7f72c188f9f26769164 Mon Sep 17 00:00:00 2001 From: Mikael Lundin Date: Thu, 27 Jun 2024 12:31:35 +0200 Subject: [PATCH] Fix for DSA test not being correct. --- .../adnuntiustest/supplemental/check-dsa.json | 254 ++++++++---------- 1 file changed, 118 insertions(+), 136 deletions(-) diff --git a/adapters/adnuntius/adnuntiustest/supplemental/check-dsa.json b/adapters/adnuntius/adnuntiustest/supplemental/check-dsa.json index c6c1b5df223..5f01e19318d 100644 --- a/adapters/adnuntius/adnuntiustest/supplemental/check-dsa.json +++ b/adapters/adnuntius/adnuntiustest/supplemental/check-dsa.json @@ -1,153 +1,135 @@ { - "imp": [ - { + "mockBidRequest": { + "id": "test-request-id", + "user": { + "id": "1kjh3429kjh295jkl" + }, + "site": { + "ext":{ + "data" : { + "key": ["value"] + } + } + }, + "regs": { "ext": { - "data": { - - }, - "prebid": { - "bidder": { - "adnuntius": { - "auId": "000000000021aca6" - } - }, - "adunitcode": "/19660636/adn_rect_01" + "dsa": { + "dsarequired": 3, + "pubrender": 1, + "datatopub": 1 } - }, - "id": "/19660636/adn_rect_01", - "banner": { - "topframe": 1, - "format": [ - { - "w": 300, - "h": 250 - } - ] } - } - ], - "user": { - "data": [ + }, + "imp": [ { - "name": "adnuntius", - "segment": [ - { - "id": "outerSegment123" - }, - { - "id": "moooore!" - } - ] - } - ], - "ext": { - "eids": [ - { - "source": "SCHNO-EnvHash", - "uids": [ + "id": "test-imp-id", + "banner": { + "format": [ { - "id": "eyJraWQiOiIyIiwiYWxnIjoiSFMyNTYifQ--EwULowzgAb-9XhVnWLSB8eun29QCbpuMK0rf9S5kJyw", - "atype": 1, - "ext": { - "stype": "ppuid" - } + "w": 300, + "h": 250 + }, + { + "w": 300, + "h": 600 } ] - } - ] - } - }, - "regs": { - "ext": { - "dsa": { - "dsarequired": 3, - "pubrender": 0, - "datatopub": 2, - "transparency": [ - { - "domain": "platform1domain.com", - "dsaparams": [ - 1 - ] - }, - { - "domain": "SSP2domain.com", - "dsaparams": [ - 1, - 2 - ] + }, + "ext": { + "bidder": { + "auId": "123" } - ] - } - } - }, - "site": { - "domain": "adnun.net", - "publisher": { - "domain": "adnun.net", - "id": "1" - }, - "page": "https://adnun.net/prebid/server/?pbjs_debug=true", - "ext": { - "data": { - "no-sch-geo": [ - "glcountry_no", - "glwe_shower_in_vicinity" - ] + } } - } + ] }, - "device": { - "w": 567, - "h": 1328, - "dnt": 0, - "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36", - "language": "en", - "sua": { - "source": 1, - "platform": { - "brand": "macOS" - }, - "browsers": [ - { - "brand": "Not/A)Brand", - "version": [ - "8" - ] + "httpCalls": [ + { + "expectedRequest": { + "uri": "http://whatever.url?format=json&tzo=0", + "body": { + "adUnits": [ + { + "auId": "123", + "targetId": "123-test-imp-id", + "dimensions": [[300,250],[300,600]] + } + ], + "kv": { + "key": ["value"] + }, + "metaData": { + "usi": "1kjh3429kjh295jkl" + }, + "context": "unknown" }, - { - "brand": "Chromium", - "version": [ - "126" + "impIDs":["test-imp-id"] + }, + "mockResponse": { + "status": 200, + "body": { + "adUnits": [ + { + "auId": "0000000000000123", + "targetId": "123-test-imp-id", + "html": "", + "responseId": "adn-rsp-900646517", + "ads": [ + { + "destinationUrls": { + "url": "http://www.google.com" + }, + "bid": { + "amount": 20.0, + "currency": "NOK" + }, + "adId": "adn-id-1559784094", + "creativeWidth": "980", + "creativeHeight": "240", + "creativeId": "jn9hpzvlsf8cpdmm", + "lineItemId": "q7y9qm5b0xt9htrv", + "advertiser": { + "legalName": "LegalName", + "name": "Name" + } + } + ] + } ] - }, + } + } + } + ], + "expectedBidResponses": [ + { + "bids": [ { - "brand": "Google Chrome", - "version": [ - "126" - ] + "bid": { + "id": "adn-id-1559784094", + "impid": "test-imp-id", + "price": 20000, + "adm": "", + "adid": "adn-id-1559784094", + "adomain": [ + "google.com" + ], + "cid": "q7y9qm5b0xt9htrv", + "crid": "jn9hpzvlsf8cpdmm", + "w": 980, + "h": 240, + "ext": { + "dsa": { + "paid": "LegalName", + "behalf": "LegalName", + "adrender": 0 + } + } + }, + "type": "banner" + } ], - "mobile": 0 + "currency": "NOK" } - }, - "id": "5bda7aea-2d3b-4927-88ed-b835144e2b6e", - "test": 0, - "ext": { - "prebid": { - "auctiontimestamp": 1719324329757, - "targeting": { - "includewinners": true, - "includebidderkeys": false - }, - "debug": true, - "channel": { - "name": "pbjs", - "version": "v9.2.0" - }, - "createtids": false - }, - "tmaxmax": 1000 - }, - "tmax": 500 -} + ] +} \ No newline at end of file