-
Notifications
You must be signed in to change notification settings - Fork 755
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
junping.zhao
committed
May 8, 2020
1 parent
59d226d
commit 0558b6e
Showing
9 changed files
with
433 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{ | ||
"mockBidRequest": { | ||
"id": "test-request-id", | ||
"imp": [ | ||
{ | ||
"id": "test-imp-id", | ||
"banner": { | ||
"format": [{"w": 300, "h": 50}] | ||
}, | ||
"ext": { | ||
"bidder": { | ||
"pubId": "fake-pub-id", | ||
"zoneId": "sin" | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
|
||
"httpCalls": [ | ||
{ | ||
"expectedRequest": { | ||
"uri": "https://gw-sin-bid.yeahtargeter.com/prebid/bid", | ||
"body": { | ||
"id": "test-request-id", | ||
"imp": [ | ||
{ | ||
"id":"test-imp-id", | ||
"banner": { | ||
"format": [{"w": 300, "h": 50}] | ||
}, | ||
"ext": { | ||
"bidder": { | ||
"pubId": "fake-pub-id", | ||
"zoneId": "sin" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
"mockResponse": { | ||
"status": 204, | ||
"body": {} | ||
} | ||
} | ||
], | ||
|
||
"expectedBidResponses": [] | ||
|
||
} |
82 changes: 82 additions & 0 deletions
82
adapters/yeahmobi/yeahmobitest/exemplary/simple-native-1.1.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
{ | ||
"mockBidRequest": { | ||
"id": "test-request-id", | ||
"imp": [ | ||
{ | ||
"id": "test-imp-id", | ||
"native": { | ||
"request": "{\"native\":{\"ver\":\"1.2\",\"context\":1,\"plcmttype\":4,\"plcmtcnt\":1,\"assets\":[{\"id\":2,\"required\":1,\"title\":{\"len\":90}},{\"id\":6,\"required\":1,\"img\":{\"type\":3,\"wmin\":128,\"hmin\":128,\"mimes\":[\"image/jpg\",\"image/jpeg\",\"image/png\"]}},{\"id\":7,\"required\":1,\"data\":{\"type\":2,\"len\":120}}]}}", | ||
"ver": "1.2" | ||
}, | ||
"ext": { | ||
"bidder": { | ||
"pubId": "fake-pub-id", | ||
"zoneId": "sin" | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
"httpcalls": [ | ||
{ | ||
"expectedRequest": { | ||
"uri": "https://gw-sin-bid.yeahtargeter.com/prebid/bid", | ||
"body": { | ||
"id": "test-request-id", | ||
"imp": [ | ||
{ | ||
"id": "test-imp-id", | ||
"native": { | ||
"request": "{\"native\":{\"ver\":\"1.2\",\"context\":1,\"plcmttype\":4,\"plcmtcnt\":1,\"assets\":[{\"id\":2,\"required\":1,\"title\":{\"len\":90}},{\"id\":6,\"required\":1,\"img\":{\"type\":3,\"wmin\":128,\"hmin\":128,\"mimes\":[\"image/jpg\",\"image/jpeg\",\"image/png\"]}},{\"id\":7,\"required\":1,\"data\":{\"type\":2,\"len\":120}}]}}", | ||
"ver": "1.2" | ||
}, | ||
"ext": { | ||
"bidder": { | ||
"pubId": "fake-pub-id", | ||
"zoneId": "sin" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
"mockResponse": { | ||
"status": 200, | ||
"body": { | ||
"id": "test-request-id", | ||
"seatbid": [ | ||
{ | ||
"bid": [ | ||
{ | ||
"id": "8400d766-58b3-47d4-80d7-6658b337d403", | ||
"impid": "test-imp-id", | ||
"price": 1.2, | ||
"adm": "some ads", | ||
"crid": "crid_testid" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
} | ||
], | ||
"expectedBidResponses": [ | ||
{ | ||
"currency": "USD", | ||
"bids": [ | ||
{ | ||
"bid": { | ||
"id": "8400d766-58b3-47d4-80d7-6658b337d403", | ||
"impid": "test-imp-id", | ||
"price": 1.2, | ||
"adm": "some ads", | ||
"crid": "crid_testid" | ||
|
||
}, | ||
"type": "native" | ||
} | ||
] | ||
} | ||
] | ||
} |
89 changes: 89 additions & 0 deletions
89
adapters/yeahmobi/yeahmobitest/exemplary/simple-video.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
{ | ||
"mockBidRequest": { | ||
"id": "test-request-id", | ||
"imp": [ | ||
{ | ||
"id": "test-imp-id", | ||
"video": { | ||
"w": 300, | ||
"h": 250, | ||
"mimes": [ | ||
"video/mp4" | ||
] | ||
}, | ||
"ext": { | ||
"bidder": { | ||
"pubId": "fake-pub-id", | ||
"zoneId": "sin" | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
|
||
"httpCalls": [ | ||
{ | ||
"expectedRequest": { | ||
"uri": "https://gw-sin-bid.yeahtargeter.com/prebid/bid", | ||
"body": { | ||
"id": "test-request-id", | ||
"imp": [ | ||
{ | ||
"id":"test-imp-id", | ||
"video": { | ||
"w": 300, | ||
"h": 250, | ||
"mimes": [ | ||
"video/mp4" | ||
] | ||
}, | ||
"ext": { | ||
"bidder": { | ||
"pubId": "fake-pub-id", | ||
"zoneId": "sin" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
"mockResponse": { | ||
"status": 200, | ||
"body": { | ||
"id": "test-request-id", | ||
"seatbid": [ | ||
{ | ||
"seat": "ttx", | ||
"bid": [{ | ||
"id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", | ||
"impid": "test-imp-id", | ||
"price": 1.2, | ||
"adm": "some-ads", | ||
"crid": "crid_testid" | ||
}] | ||
} | ||
], | ||
"cur": "USD" | ||
} | ||
} | ||
} | ||
], | ||
|
||
"expectedBidResponses": [ | ||
{ | ||
"currency": "USD", | ||
"bids": [ | ||
{ | ||
"bid": { | ||
"id": "8ee514f1-b2b8-4abb-89fd-084437d1e800", | ||
"impid": "test-imp-id", | ||
"price": 1.2, | ||
"adm": "some-ads", | ||
"crid": "crid_testid" | ||
}, | ||
"type": "video" | ||
} | ||
] | ||
} | ||
] | ||
} |
21 changes: 21 additions & 0 deletions
21
adapters/yeahmobi/yeahmobitest/supplemental/bad_imp_ext.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"mockBidRequest": { | ||
"id": "test-request-id", | ||
"imp": [ | ||
{ | ||
"id": "test-imp-id", | ||
"banner": { | ||
"format": [{"w": 300, "h": 50}] | ||
}, | ||
"ext": "aaa" | ||
} | ||
] | ||
}, | ||
|
||
"expectedMakeRequestsErrors": [ | ||
{ | ||
"value": "json: cannot unmarshal string into Go value of type adapters.ExtImpBidder", | ||
"comparison": "literal" | ||
} | ||
] | ||
} |
23 changes: 23 additions & 0 deletions
23
adapters/yeahmobi/yeahmobitest/supplemental/bad_imp_ext_bidder.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"mockBidRequest": { | ||
"id": "test-request-id", | ||
"imp": [ | ||
{ | ||
"id": "test-imp-id", | ||
"banner": { | ||
"format": [{"w": 300, "h": 50}] | ||
}, | ||
"ext": { | ||
"bidder": "aa" | ||
} | ||
} | ||
] | ||
}, | ||
|
||
"expectedMakeRequestsErrors": [ | ||
{ | ||
"value": "json: cannot unmarshal string into Go value of type openrtb_ext.ExtImpYeahmobi", | ||
"comparison": "literal" | ||
} | ||
] | ||
} |
55 changes: 55 additions & 0 deletions
55
adapters/yeahmobi/yeahmobitest/supplemental/bad_response.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
{ | ||
"mockBidRequest": { | ||
"id": "test-request-id", | ||
"imp": [ | ||
{ | ||
"id": "test-imp-id", | ||
"banner": { | ||
"format": [{"w": 300, "h": 50}] | ||
}, | ||
"ext": { | ||
"bidder": { | ||
"pubId": "fake-pub-id", | ||
"zoneId": "sin" | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
|
||
"httpCalls": [ | ||
{ | ||
"expectedRequest": { | ||
"uri": "https://gw-sin-bid.yeahtargeter.com/prebid/bid", | ||
"body": { | ||
"id": "test-request-id", | ||
"imp": [ | ||
{ | ||
"id":"test-imp-id", | ||
"banner": { | ||
"format": [{"w": 300, "h": 50}] | ||
}, | ||
"ext": { | ||
"bidder": { | ||
"pubId": "fake-pub-id", | ||
"zoneId": "sin" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
"mockResponse": { | ||
"status": 200, | ||
"body": "{\"id\":test-request-id" | ||
} | ||
} | ||
], | ||
|
||
"expectedMakeBidsErrors": [ | ||
{ | ||
"comparison": "literal", | ||
"value": "json: cannot unmarshal string into Go value of type openrtb.BidResponse" | ||
} | ||
] | ||
} |
Oops, something went wrong.