-
Notifications
You must be signed in to change notification settings - Fork 762
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use mtype for parsing media type and expand test coverage
- Loading branch information
1 parent
1400778
commit f34f503
Showing
11 changed files
with
931 additions
and
17 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
90 changes: 90 additions & 0 deletions
90
adapters/trustedstack/trustedstacktest/exemplary/simple-audio-mtype.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,90 @@ | ||
{ | ||
"mockBidRequest": { | ||
"id": "test-request-id", | ||
"imp": [ | ||
{ | ||
"id": "1", | ||
"audio": { | ||
"mimes": ["audio/mp3"], | ||
"protocols": [2, 5] | ||
}, | ||
"ext": { | ||
"bidder": { | ||
"cid": "8CUTSTCID", | ||
"crid": "999999999" | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
"httpCalls": [ | ||
{ | ||
"expectedRequest": { | ||
"uri": "https://example.trustedstack.com/rtb/prebid?src=http%3A%2F%2Fhosturl.com", | ||
"body": { | ||
"id": "test-request-id", | ||
"imp": [ | ||
{ | ||
"id": "1", | ||
"audio": { | ||
"mimes": [ | ||
"audio/mp3" | ||
], | ||
"protocols": [ | ||
2, | ||
5 | ||
] | ||
}, | ||
"ext": { | ||
"bidder": { | ||
"cid": "8CUTSTCID", | ||
"crid": "999999999" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
"mockResponse": { | ||
"status": 200, | ||
"body": { | ||
"id": "test-request-id", | ||
"cur": "USD", | ||
"seatbid": [ | ||
{ | ||
"seat": "trustedstack", | ||
"bid": [ | ||
{ | ||
"id": "test-bid-id", | ||
"impid": "1", | ||
"price": 2.50, | ||
"adm": "some-test-ad", | ||
"crid": "test-crid", | ||
"mtype": 3 | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
} | ||
], | ||
"expectedBidResponses": [ | ||
{ | ||
"currency": "USD", | ||
"bids": [ | ||
{ | ||
"bid": { | ||
"id": "test-bid-id", | ||
"impid": "1", | ||
"price": 2.50, | ||
"adm": "some-test-ad", | ||
"crid": "test-crid", | ||
"mtype": 3 | ||
}, | ||
"type": "audio" | ||
} | ||
] | ||
} | ||
] | ||
} |
88 changes: 88 additions & 0 deletions
88
adapters/trustedstack/trustedstacktest/exemplary/simple-audio.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,88 @@ | ||
{ | ||
"mockBidRequest": { | ||
"id": "test-request-id", | ||
"imp": [ | ||
{ | ||
"id": "1", | ||
"audio": { | ||
"mimes": ["audio/mp3"], | ||
"protocols": [2, 5] | ||
}, | ||
"ext": { | ||
"bidder": { | ||
"cid": "8CUTSTCID", | ||
"crid": "999999999" | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
"httpCalls": [ | ||
{ | ||
"expectedRequest": { | ||
"uri": "https://example.trustedstack.com/rtb/prebid?src=http%3A%2F%2Fhosturl.com", | ||
"body": { | ||
"id": "test-request-id", | ||
"imp": [ | ||
{ | ||
"id": "1", | ||
"audio": { | ||
"mimes": [ | ||
"audio/mp3" | ||
], | ||
"protocols": [ | ||
2, | ||
5 | ||
] | ||
}, | ||
"ext": { | ||
"bidder": { | ||
"cid": "8CUTSTCID", | ||
"crid": "999999999" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
"mockResponse": { | ||
"status": 200, | ||
"body": { | ||
"id": "test-request-id", | ||
"cur": "USD", | ||
"seatbid": [ | ||
{ | ||
"seat": "trustedstack", | ||
"bid": [ | ||
{ | ||
"id": "test-bid-id", | ||
"impid": "1", | ||
"price": 2.50, | ||
"adm": "some-test-ad", | ||
"crid": "test-crid" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
} | ||
], | ||
"expectedBidResponses": [ | ||
{ | ||
"currency": "USD", | ||
"bids": [ | ||
{ | ||
"bid": { | ||
"id": "test-bid-id", | ||
"impid": "1", | ||
"price": 2.50, | ||
"adm": "some-test-ad", | ||
"crid": "test-crid" | ||
}, | ||
"type": "audio" | ||
} | ||
] | ||
} | ||
] | ||
} |
100 changes: 100 additions & 0 deletions
100
adapters/trustedstack/trustedstacktest/exemplary/simple-banner-mtype.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,100 @@ | ||
{ | ||
"mockBidRequest": { | ||
"id": "test-request-id", | ||
"imp": [ | ||
{ | ||
"id": "1", | ||
"banner": { | ||
"format": [ | ||
{ | ||
"w": 320, | ||
"h": 50 | ||
} | ||
] | ||
}, | ||
"ext": { | ||
"bidder": { | ||
"cid": "8CUTSTCID", | ||
"crid": "999999999" | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
|
||
"httpCalls": [ | ||
{ | ||
"expectedRequest": { | ||
"uri": "https://example.trustedstack.com/rtb/prebid?src=http%3A%2F%2Fhosturl.com", | ||
"body": { | ||
"id": "test-request-id", | ||
"imp": [ | ||
{ | ||
"id": "1", | ||
"banner": { | ||
"format": [ | ||
{ | ||
"w": 320, | ||
"h": 50 | ||
} | ||
] | ||
}, | ||
"ext": { | ||
"bidder": { | ||
"cid": "8CUTSTCID", | ||
"crid": "999999999" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
|
||
"mockResponse": { | ||
"status": 200, | ||
"body": { | ||
"id": "test-request-id", | ||
"seatbid": [ | ||
{ | ||
"seat": "trustedstack", | ||
"bid": [ | ||
{ | ||
"id": "test-bid-id", | ||
"impid": "1", | ||
"price": 1.50, | ||
"adm": "some-test-ad", | ||
"crid": "test-crid", | ||
"h": 50, | ||
"w": 320, | ||
"mtype": 1 | ||
} | ||
] | ||
} | ||
], | ||
"cur": "USD" | ||
} | ||
} | ||
} | ||
], | ||
|
||
"expectedBidResponses": [ | ||
{ | ||
"currency": "USD", | ||
"bids": [ | ||
{ | ||
"bid": { | ||
"id": "test-bid-id", | ||
"impid": "1", | ||
"price": 1.50, | ||
"adm": "some-test-ad", | ||
"crid": "test-crid", | ||
"w": 320, | ||
"h": 50, | ||
"mtype": 1 | ||
}, | ||
"type": "banner" | ||
} | ||
] | ||
} | ||
] | ||
} |
Oops, something went wrong.