Skip to content

Commit

Permalink
Fix Beachfront JSON tests (#1578)
Browse files Browse the repository at this point in the history
  • Loading branch information
mansinahar authored Nov 17, 2020
1 parent acf889e commit 17f5020
Show file tree
Hide file tree
Showing 13 changed files with 462 additions and 504 deletions.
43 changes: 22 additions & 21 deletions adapters/beachfront/beachfronttest/exemplary/minimal-banner.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
}
]
},

"httpCalls": [
{
"expectedRequest": {
Expand Down Expand Up @@ -57,38 +56,40 @@
"ua": "",
"adapterName": "BF_PREBID_S2S",
"adapterVersion": "0.9.0",
"user": {
}
"user": {}
}
},
"mockResponse": {
"status": 200,
"body": [
{
"crid":"crid_1",
"price":2.942808,
"w":300,
"h":250,
"slot":"div-gpt-ad-1460505748561-0",
"adm":"<div id=\"44861168\"><script>!function(){console.log\"Hello, ad.\";}();<\/script><\/div>"
"crid": "crid_1",
"price": 2.942808,
"w": 300,
"h": 250,
"slot": "div-gpt-ad-1460505748561-0",
"adm": "<div id=\"44861168\"><script>!function(){console.log\"Hello, ad.\";}();<\/script><\/div>"
}
]
}
}
],

"expectedBids": [
"expectedBidResponses": [
{
"bid": {
"id": "12345678",
"impid": "test-slot",
"price": 2,
"adm": "\u003cdiv id=\"12345678\" style=\"width:300;height:250;background-color:black;color:white;\"\u003e300x250\u003c\\div\u003e",
"crid": "crid_1",
"w": 300,
"h": 250
},
"type": "banner"
"bids": [
{
"bid": {
"id": "div-gpt-ad-1460505748561-0Banner",
"impid": "div-gpt-ad-1460505748561-0",
"price": 2.942808,
"adm": "<div id=\"44861168\"><script>!function(){console.log\"Hello, ad.\";}();<\/script><\/div>",
"crid": "crid_1",
"w": 300,
"h": 250
},
"type": "banner"
}
]
}
]
}
100 changes: 49 additions & 51 deletions adapters/beachfront/beachfronttest/exemplary/simple-adm-video.json
Original file line number Diff line number Diff line change
@@ -1,34 +1,33 @@
{
"mockBidRequest":
{
"id":"61b87329-8790-47b7-90dd-c53ae7ce1723",
"tmax":1000,
"source":{
"tid":"61b87329-8790-47b7-90dd-c53ae7ce1723"
"mockBidRequest": {
"id": "61b87329-8790-47b7-90dd-c53ae7ce1723",
"tmax": 1000,
"source": {
"tid": "61b87329-8790-47b7-90dd-c53ae7ce1723"
},
"imp":[
"imp": [
{
"id":"video1",
"ext":{
"bidder":{
"videoResponseType" : "adm",
"bidfloor":0.01,
"appId":"11bc5dd5-7421-4dd8-c926-40fa653bec76"
"id": "video1",
"ext": {
"bidder": {
"videoResponseType": "adm",
"bidfloor": 0.01,
"appId": "11bc5dd5-7421-4dd8-c926-40fa653bec76"
}
},
"video":{
"mimes":[
"video": {
"mimes": [
"video/mp4"
],
"context":"instream",
"w":300,
"h":250
"context": "instream",
"w": 300,
"h": 250
}
}
],
"site":{
"publisher":{
"id":"publisher1"
"site": {
"publisher": {
"id": "publisher1"
},
"page": "http://example.com/whatever/something.html"
},
Expand All @@ -42,7 +41,6 @@
"ua": "Opera/9.80 (X11; Linux i686; Ubuntu/14.10) Presto/2.12.388 Version/12.16"
}
},

"httpCalls": [
{
"expectedRequest": {
Expand All @@ -63,8 +61,8 @@
}
],
"site": {
"publisher":{
"id":"publisher1"
"publisher": {
"id": "publisher1"
},
"page": "http://example.com/whatever/something.html",
"domain": "example.com"
Expand All @@ -75,10 +73,9 @@
"ip": "192.168.255.255"
},
"source": {
"tid": "61b87329-8790-47b7-90dd-c53ae7ce1723"
"tid": "61b87329-8790-47b7-90dd-c53ae7ce1723"
},
"tmax": 1000,

"cur": [
"USD"
],
Expand All @@ -87,12 +84,12 @@
"buyeruid": "some-buyer"
}
}
},
},
"mockResponse": {
"status" : 200,
"status": 200,
"body": {
"id":"61b87329-8790-47b7-90dd-c53ae7ce1723",
"seatBid":[
"id": "61b87329-8790-47b7-90dd-c53ae7ce1723",
"seatBid": [
{
"bid": [
{
Expand Down Expand Up @@ -122,31 +119,32 @@
}
}
],

"expectedBids": [
"expectedBidResponses": [
{

"bid":[
"bids": [
{
"id": "video1AdmVideo",
"impid": "video1",
"price": 20,
"adm": "<?xml version=\"1.0\" encoding=\"utf-8\"?><VAST version=\"2.0\"><Ad id=\"VPAID\"><InLine><AdSystem version=\"2.0\">IO</AdSystem><AdTitle>Neptune</AdTitle><Impression></Impression><Creatives><Creative sequence=\"1\"><Linear><Duration>00:00:15</Duration><MediaFiles><MediaFile delivery=\"progressive\" width=\"640\" height=\"480\" scalable=\"1\" type=\"application/javascript\" apiFramework=\"VPAID\"><![CDATA[http://player-cdn.beachfrontmedia.com/players/neptune/3/17/5/neptune-player.js]]></MediaFile></MediaFiles><AdParameters><![CDATA[{\"dsp\":\"5d8393417cbc8e5aa4fe2202,0.01\",\"inventory_id\":\"bid:95d219a2-6025-44ba-bff8-1dca987beaae:11bc5dd5-7421-4dd8-c926-40fa653bec76:${AUCTION_PRICE}:20.0\",\"request_endpoint\":\"//useast.bfmio.com/getmu\",\"inventory_type\":\"pre\"}]]></AdParameters></Linear></Creative></Creatives></InLine></Ad></VAST>",
"adid": "1088",
"adomain": [
"beachfront.io"
],
"cid": "277",
"crid": "532",
"w": 300,
"h": 250,
"ext": {
"prebid": {
"type": "video"
"bid": {
"id": "video1AdmVideo",
"impid": "video1",
"price": 20,
"adm": "<?xml version=\"1.0\" encoding=\"utf-8\"?><VAST version=\"2.0\"><Ad id=\"VPAID\"><InLine><AdSystem version=\"2.0\">IO</AdSystem><AdTitle>Neptune</AdTitle><Impression></Impression><Creatives><Creative sequence=\"1\"><Linear><Duration>00:00:15</Duration><MediaFiles><MediaFile delivery=\"progressive\" width=\"640\" height=\"480\" scalable=\"1\" type=\"application/javascript\" apiFramework=\"VPAID\"><![CDATA[http://player-cdn.beachfrontmedia.com/players/neptune/3/17/5/neptune-player.js]]></MediaFile></MediaFiles><AdParameters><![CDATA[{\"dsp\":\"5d8393417cbc8e5aa4fe2202,0.01\",\"inventory_id\":\"bid:95d219a2-6025-44ba-bff8-1dca987beaae:11bc5dd5-7421-4dd8-c926-40fa653bec76:${AUCTION_PRICE}:20.0\",\"request_endpoint\":\"//useast.bfmio.com/getmu\",\"inventory_type\":\"pre\"}]]></AdParameters></Linear></Creative></Creatives></InLine></Ad></VAST>",
"adid": "1088",
"adomain": [
"beachfront.io"
],
"cid": "277",
"crid": "532",
"w": 300,
"h": 250,
"ext": {
"prebid": {
"type": "video"
}
}
}
},
"type": "video"
}
]
}
]
}
}
Loading

0 comments on commit 17f5020

Please sign in to comment.