From 61a49fc32a8c6a8ab8b6f1b498b83cecfdbf39b2 Mon Sep 17 00:00:00 2001 From: Alessandro Rosetti Date: Mon, 16 Dec 2024 15:25:29 +0100 Subject: [PATCH] CWire: add exemplary simple app JSON tests --- .../cwiretest/exemplary/app-imp-ext.json | 160 ++++++++++++++++++ adapters/cwire/cwiretest/exemplary/app.json | 146 ++++++++++++++++ 2 files changed, 306 insertions(+) create mode 100644 adapters/cwire/cwiretest/exemplary/app-imp-ext.json create mode 100644 adapters/cwire/cwiretest/exemplary/app.json diff --git a/adapters/cwire/cwiretest/exemplary/app-imp-ext.json b/adapters/cwire/cwiretest/exemplary/app-imp-ext.json new file mode 100644 index 0000000000..d5191ca851 --- /dev/null +++ b/adapters/cwire/cwiretest/exemplary/app-imp-ext.json @@ -0,0 +1,160 @@ +{ + "mockBidRequest": { + "id": "80ce30c53c16e6ede735f123ef6e32361bfc7b22", + "cur": [ + "CHF" + ], + "imp": [ + { + "id": "102", + "banner": { + "h": 250, + "w": 300, + "pos": 0 + }, + "ext": { + "bidder": { + "cwcreative": "9999", + "placementId": 15, + "domainId": 42 + } + } + } + ], + "app": { + "publisher": { + "id": "123456789" + }, + "cat": [ + "IAB22-1" + ], + "bundle": "com.app.awesome", + "name": "Awesome App", + "domain": "awesomeapp.com", + "id": "123456789" + }, + "device": { + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:108.0) Gecko/20100101 Firefox/108.0" + }, + "user": { + "id": "55816b39711f9b5acf3b90e313ed29e51665623f", + "geo": { + "country": "ch", + "region": "basel-stadt", + "city": "basel" + } + } + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://cwi.re/prebid/adapter-endpoint", + "headers": { + "Content-Type": [ + "application/json;charset=utf-8" + ], + "Accept": [ + "application/json" + ] + }, + "body": { + "id": "80ce30c53c16e6ede735f123ef6e32361bfc7b22", + "cur": [ + "CHF" + ], + "imp": [ + { + "id": "102", + "banner": { + "h": 250, + "w": 300, + "pos": 0 + }, + "ext": { + "bidder": { + "cwcreative": "9999", + "placementId": 15, + "domainId": 42 + } + } + } + ], + "app": { + "publisher": { + "id": "123456789" + }, + "cat": [ + "IAB22-1" + ], + "bundle": "com.app.awesome", + "name": "Awesome App", + "domain": "awesomeapp.com", + "id": "123456789" + }, + "device": { + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:108.0) Gecko/20100101 Firefox/108.0" + }, + "user": { + "id": "55816b39711f9b5acf3b90e313ed29e51665623f", + "geo": { + "country": "ch", + "region": "basel-stadt", + "city": "basel" + } + } + }, + "impIDs": [ + "102" + ] + }, + "mockResponse": { + "status": 200, + "headers": {}, + "body": { + "id": "80ce30c53c16e6ede735f123ef6e32361bfc7b22", + "cur": "CHF", + "seatbid": [ + { + "seat": "cwire", + "group": 0, + "bid": [ + { + "id": "333", + "impid": "102", + "price": 8.00, + "crid": "9999", + "adm": "

Example Ad

", + "w": 1, + "h": 1, + "nurl": "https://embed.cwi.re/delivery/prebid-server/win/333", + "mtype": 1 + } + ] + } + ] + } + } + } + ], + "expectedBidResponses": [ + { + "currency": "CHF", + "bids": [ + { + "bid": { + "id": "333", + "impid": "102", + "price": 8.00, + "crid": "9999", + "adm": "

Example Ad

", + "w": 1, + "h": 1, + "nurl": "https://embed.cwi.re/delivery/prebid-server/win/333", + "mtype": 1 + }, + "type": "banner" + } + ] + } + ] +} \ No newline at end of file diff --git a/adapters/cwire/cwiretest/exemplary/app.json b/adapters/cwire/cwiretest/exemplary/app.json new file mode 100644 index 0000000000..ebc3de532a --- /dev/null +++ b/adapters/cwire/cwiretest/exemplary/app.json @@ -0,0 +1,146 @@ +{ + "mockBidRequest": { + "id": "80ce30c53c16e6ede735f123ef6e32361bfc7b22", + "cur": [ + "CHF" + ], + "imp": [ + { + "id": "102", + "banner": { + "h": 250, + "w": 300, + "pos": 0 + } + } + ], + "app": { + "publisher": { + "id": "123456789" + }, + "cat": [ + "IAB22-1" + ], + "bundle": "com.app.awesome", + "name": "Awesome App", + "domain": "awesomeapp.com", + "id": "123456789" + }, + "device": { + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:108.0) Gecko/20100101 Firefox/108.0" + }, + "user": { + "id": "55816b39711f9b5acf3b90e313ed29e51665623f", + "geo": { + "country": "ch", + "region": "basel-stadt", + "city": "basel" + } + } + }, + "httpCalls": [ + { + "expectedRequest": { + "uri": "https://cwi.re/prebid/adapter-endpoint", + "headers": { + "Content-Type": [ + "application/json;charset=utf-8" + ], + "Accept": [ + "application/json" + ] + }, + "body": { + "id": "80ce30c53c16e6ede735f123ef6e32361bfc7b22", + "cur": [ + "CHF" + ], + "imp": [ + { + "id": "102", + "banner": { + "h": 250, + "w": 300, + "pos": 0 + } + } + ], + "app": { + "publisher": { + "id": "123456789" + }, + "cat": [ + "IAB22-1" + ], + "bundle": "com.app.awesome", + "name": "Awesome App", + "domain": "awesomeapp.com", + "id": "123456789" + }, + "device": { + "ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:108.0) Gecko/20100101 Firefox/108.0" + }, + "user": { + "id": "55816b39711f9b5acf3b90e313ed29e51665623f", + "geo": { + "country": "ch", + "region": "basel-stadt", + "city": "basel" + } + } + }, + "impIDs": [ + "102" + ] + }, + "mockResponse": { + "status": 200, + "headers": {}, + "body": { + "id": "80ce30c53c16e6ede735f123ef6e32361bfc7b22", + "cur": "CHF", + "seatbid": [ + { + "seat": "cwire", + "group": 0, + "bid": [ + { + "id": "333", + "impid": "102", + "price": 8.00, + "crid": "4321", + "adm": "

Example Ad

", + "w": 1, + "h": 1, + "nurl": "https://embed.cwi.re/delivery/prebid-server/win/333", + "mtype": 1 + } + ] + } + ] + } + } + } + ], + "expectedBidResponses": [ + { + "currency": "CHF", + "bids": [ + { + "bid": { + "id": "333", + "impid": "102", + "price": 8.00, + "crid": "4321", + "adm": "

Example Ad

", + "w": 1, + "h": 1, + "nurl": "https://embed.cwi.re/delivery/prebid-server/win/333", + "mtype": 1 + }, + "type": "banner" + } + ] + } + ] +} \ No newline at end of file