Skip to content

Commit

Permalink
[AUC-470] Fix and add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rneuplanche committed Nov 8, 2024
1 parent 6b4e2d2 commit f743645
Show file tree
Hide file tree
Showing 8 changed files with 373 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,247 @@
{
"mockBidRequest": {
"id": "test-request-multi-id",
"imp": [
{
"id": "test-imp-id-1",
"banner": {
"format": [
{
"w": 728,
"h": 90
}
]
},
"video": {
"mimes": [
"video/mp4"
],
"protocols": [
1
],
"w": 1024,
"h": 576
},
"ext": {
"bidder": {
"siteId": 1,
"pageId": 2,
"formatId": 3,
"networkId": 73
}
}
},
{
"id": "test-imp-id-2",
"banner": {
"format": [
{
"w": 300,
"h": 150
}
]
},
"video": {
"mimes": [
"video/mp4"
],
"protocols": [
1
],
"w": 920,
"h": 200
},
"ext": {
"bidder": {
"siteId": 1,
"pageId": 2,
"formatId": 4,
"networkId": 73
}
}
}
]
},
"httpCalls": [
{
"expectedRequest": {
"uri": "https://ssb.smartadserver.com/api/bid?callerId=5",
"body": {
"id": "test-request-multi-id",
"imp": [
{
"id": "test-imp-id-1",
"banner": {
"format": [
{
"w": 728,
"h": 90
}
]
},
"video": {
"mimes": [
"video/mp4"
],
"protocols": [
1
],
"w": 1024,
"h": 576
},
"ext": {
"bidder": {
"siteId": 1,
"pageId": 2,
"formatId": 3,
"networkId": 73
}
}
}
],
"site": {
"publisher": {
"id": "73"
}
}
},
"impIDs": [
"test-imp-id-1"
]
},
"mockResponse": {
"status": 200,
"body": {
"id": "test-request-multi-id",
"seatbid": [
{
"seat": "smartadserver",
"bid": [
{
"id": "8ee514f1-b2b8-4abb-89fd-084437d1e800",
"impid": "test-imp-id-1",
"price": 0.500000,
"adm": "some-test-ad",
"crid": "crid_10",
"mtype": 1,
"w": 728,
"h": 90
}
]
}
],
"cur": "USD"
}
}
},
{
"expectedRequest": {
"uri": "https://ssb.smartadserver.com/api/bid?callerId=5",
"body": {
"id": "test-request-multi-id",
"imp": [
{
"id": "test-imp-id-2",
"banner": {
"format": [
{
"w": 300,
"h": 150
}
]
},
"video": {
"mimes": [
"video/mp4"
],
"protocols": [
1
],
"w": 920,
"h": 200
},
"ext": {
"bidder": {
"siteId": 1,
"pageId": 2,
"formatId": 4,
"networkId": 73
}
}
}
],
"site": {
"publisher": {
"id": "73"
}
}
},
"impIDs": [
"test-imp-id-2"
]
},
"mockResponse": {
"status": 200,
"body": {
"id": "test-request-multi-id",
"seatbid": [
{
"seat": "smartadserver",
"bid": [
{
"id": "8ee514f1-b2b8-4abb-89fd-084437d1e801",
"impid": "test-imp-id-2",
"price": 0.800000,
"adm": "some-test-ad",
"crid": "crid_11",
"mtype": 2,
"w": 920,
"h": 200
}
]
}
],
"cur": "USD"
}
}
}
],
"expectedBidResponses": [
{
"currency": "USD",
"bids": [
{
"bid": {
"id": "8ee514f1-b2b8-4abb-89fd-084437d1e800",
"impid": "test-imp-id-1",
"price": 0.5,
"adm": "some-test-ad",
"crid": "crid_10",
"mtype": 1,
"w": 728,
"h": 90
},
"type": "banner"
}
]
},
{
"currency": "USD",
"bids": [
{
"bid": {
"id": "8ee514f1-b2b8-4abb-89fd-084437d1e801",
"impid": "test-imp-id-2",
"price": 0.8,
"adm": "some-test-ad",
"crid": "crid_11",
"mtype": 2,
"w": 920,
"h": 200
},
"type": "video"
}
]
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
"price": 0.500000,
"adm": "some-test-ad",
"crid": "crid_10",
"mtype": 1,
"h": 90,
"w": 728
}]
Expand Down Expand Up @@ -127,6 +128,7 @@
"price": 0.800000,
"adm": "some-test-ad",
"crid": "crid_11",
"mtype": 1,
"h": 150,
"w": 300
}]
Expand All @@ -149,6 +151,7 @@
"price": 0.5,
"adm": "some-test-ad",
"crid": "crid_10",
"mtype": 1,
"w": 728,
"h": 90
},
Expand All @@ -166,6 +169,7 @@
"price": 0.8,
"adm": "some-test-ad",
"crid": "crid_11",
"mtype": 1,
"w": 300,
"h": 150
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
{
"mockBidRequest": {
"id": "test-request-multi-id",
"imp": [
{
"id": "test-imp-id-1",
"banner": {
"format": [{"w": 728, "h": 90}]
},
"video": {
"mimes": ["video/mp4"],
"protocols": [1],
"w": 1024,
"h": 576
},
"ext": {
"bidder": {
"siteId": 1,
"pageId": 2,
"formatId": 3,
"networkId": 73
}
}
}
]
},

"httpCalls": [
{
"expectedRequest": {
"uri": "https://ssb.smartadserver.com/api/bid?callerId=5",
"body": {
"id": "test-request-multi-id",
"imp": [
{
"id": "test-imp-id-1",
"banner": {
"format": [{"w": 728, "h": 90}]
},
"video": {
"mimes": ["video/mp4"],
"protocols": [1],
"w": 1024,
"h": 576
},
"ext": {
"bidder": {
"siteId": 1,
"pageId": 2,
"formatId": 3,
"networkId": 73
}
}
}
],
"site": {
"publisher": {
"id": "73"
}
}
},
"impIDs":["test-imp-id-1"]
},
"mockResponse": {
"status": 200,
"body": {
"id": "test-request-multi-type",
"seatbid": [
{
"seat": "smartadserver",
"bid": [{
"id": "8ee514f1-b2b8-4abb-89fd-084437d1e800",
"impid": "test-imp-id-video",
"price": 0.500000,
"adm": "some-test-ad",
"crid": "crid_10",
"mtype": 2,
"w": 1024,
"h": 576
}]
}
],
"cur": "USD"
}
}
}
],

"expectedBidResponses": [
{
"currency": "USD",
"bids": [
{
"bid": {
"id": "8ee514f1-b2b8-4abb-89fd-084437d1e800",
"impid": "test-imp-id-video",
"price": 0.5,
"adm": "some-test-ad",
"crid": "crid_10",
"mtype": 2,
"w": 1024,
"h": 576
},
"type": "video"
}
]
}
]
}

Loading

0 comments on commit f743645

Please sign in to comment.