-
Notifications
You must be signed in to change notification settings - Fork 753
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RTBHouse: detecting media type may return an error
- Loading branch information
1 parent
4478925
commit 3012d46
Showing
6 changed files
with
277 additions
and
34 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
141 changes: 141 additions & 0 deletions
141
adapters/rtbhouse/rtbhousetest/supplemental/banner-native-req-faulty-mtype-in-native.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,141 @@ | ||
{ | ||
"mockBidRequest": { | ||
"imp": [ | ||
{ | ||
"ext": { | ||
"bidder": {} | ||
}, | ||
"id": "test-native-imp", | ||
"native": { | ||
"request": "{\"eventtrackers\":[{\"event\":1,\"methods\":[1,2]}],\"ver\":\"1.2\",\"assets\":[{\"id\":0,\"required\":1,\"title\":{\"len\":140}},{\"id\":1,\"required\":1,\"data\":{\"type\":2}},{\"id\":2,\"required\":1,\"img\":{\"type\":3}}]}", | ||
"ver": "1.2" | ||
} | ||
}, | ||
{ | ||
"id": "test-banner-imp", | ||
"banner": { | ||
"format": [{ | ||
"w": 300, | ||
"h": 250 | ||
}] | ||
}, | ||
"ext": { | ||
"bidder": {} | ||
} | ||
} | ||
], | ||
"site": { | ||
"page": "https://good.site/url" | ||
}, | ||
"id": "test-multi-slot-request", | ||
"ext": {}, | ||
"debug": 1 | ||
}, | ||
"httpCalls": [ | ||
{ | ||
"expectedRequest": { | ||
"uri": "http://localhost/prebid_server", | ||
"body": { | ||
"id": "test-multi-slot-request", | ||
"cur": [ | ||
"USD" | ||
], | ||
"imp": [ | ||
{ | ||
"id": "test-native-imp", | ||
"native": { | ||
"request": "{\"eventtrackers\":[{\"event\":1,\"methods\":[1,2]}],\"ver\":\"1.2\",\"assets\":[{\"id\":0,\"required\":1,\"title\":{\"len\":140}},{\"id\":1,\"required\":1,\"data\":{\"type\":2}},{\"id\":2,\"required\":1,\"img\":{\"type\":3}}]}", | ||
"ver": "1.2" | ||
}, | ||
"ext": { | ||
"bidder": {} | ||
} | ||
}, | ||
{ | ||
"id": "test-banner-imp", | ||
"banner": { | ||
"format": [{ | ||
"w": 300, | ||
"h": 250 | ||
}] | ||
}, | ||
"ext": { | ||
"bidder": {} | ||
} | ||
} | ||
], | ||
"site": { | ||
"page": "https://good.site/url" | ||
}, | ||
"ext": {} | ||
} | ||
}, | ||
"mockResponse": { | ||
"status": 200, | ||
"body": { | ||
"id": "test-multi-slot-request", | ||
"bidid": "test-bidid", | ||
"cur": "USD", | ||
"seatbid": [ | ||
{ | ||
"seat": "rtbhouse", | ||
"bid": [ | ||
{ | ||
"id": "randomid-native", | ||
"impid": "test-native-imp", | ||
"price": 0.5, | ||
"adid": "test-adid", | ||
"adm": "{\"native\":{\"ver\":\"1.2\",\"assets\":[{\"id\":0,\"title\":{\"text\":\"title text\"}},{\"id\":1,\"data\":{\"value\":\"data value\"}},{\"id\":2,\"img\":{\"url\":\"image.url\",\"w\":1200,\"h\":628}}],\"link\":{\"url\":\"link.url\"},\"imptrackers\":[\"imp.tracker.url\"],\"eventtrackers\":[{\"event\":1,\"method\":1,\"url\":\"event.tracker.url\"}]}}", | ||
"adomain": [ "adomain.com" ], | ||
"cid": "test-cid", | ||
"crid": "test-crid", | ||
"dealid": "test-dealid", | ||
"mtype": 99 | ||
}, | ||
{ | ||
"id": "randomid-banner", | ||
"impid": "test-banner-imp", | ||
"price": 0.500000, | ||
"adid": "12345678", | ||
"adm": "some-test-ad", | ||
"cid": "987", | ||
"crid": "12345678", | ||
"h": 250, | ||
"w": 300, | ||
"mtype": 1 | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
} | ||
], | ||
"expectedBidResponses": [ | ||
{ | ||
"currency": "USD", | ||
"bids": [{ | ||
"bid": { | ||
"id": "randomid-banner", | ||
"impid": "test-banner-imp", | ||
"price": 0.500000, | ||
"adid": "12345678", | ||
"adm": "some-test-ad", | ||
"cid": "987", | ||
"crid": "12345678", | ||
"h": 250, | ||
"w": 300, | ||
"mtype": 1 | ||
}, | ||
"type": "banner" | ||
} | ||
] | ||
} | ||
], | ||
"expectedMakeBidsErrors": [ | ||
{ | ||
"value": "unrecognized bid type in response from rtbhouse for bid test-native-imp", | ||
"comparison": "literal" | ||
} | ||
] | ||
} |
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
94 changes: 94 additions & 0 deletions
94
adapters/rtbhouse/rtbhousetest/supplemental/simple-banner-bad-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,94 @@ | ||
{ | ||
"mockBidRequest": { | ||
"id": "test-request-id", | ||
"site": { | ||
"page": "https://good.site/url" | ||
}, | ||
"imp": [ | ||
{ | ||
"id": "test-imp-id", | ||
"banner": { | ||
"format": [ | ||
{ | ||
"w": 300, | ||
"h": 250 | ||
} | ||
] | ||
}, | ||
"ext": { | ||
"bidder": {} | ||
} | ||
} | ||
] | ||
}, | ||
"httpCalls": [ | ||
{ | ||
"expectedRequest": { | ||
"uri": "http://localhost/prebid_server", | ||
"body": { | ||
"id": "test-request-id", | ||
"cur": [ | ||
"USD" | ||
], | ||
"site": { | ||
"page": "https://good.site/url" | ||
}, | ||
"imp": [ | ||
{ | ||
"id": "test-imp-id", | ||
"banner": { | ||
"format": [ | ||
{ | ||
"w": 300, | ||
"h": 250 | ||
} | ||
] | ||
}, | ||
"ext": { | ||
"bidder": {} | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
"mockResponse": { | ||
"status": 200, | ||
"body": { | ||
"id": "test-request-id", | ||
"seatbid": [ | ||
{ | ||
"seat": "rtbhouse", | ||
"bid": [ | ||
{ | ||
"id": "randomid", | ||
"impid": "test-imp-id", | ||
"price": 0.500000, | ||
"adid": "12345678", | ||
"adm": "some-test-ad", | ||
"cid": "987", | ||
"crid": "12345678", | ||
"h": 250, | ||
"w": 300, | ||
"mtype": 99 | ||
} | ||
] | ||
} | ||
], | ||
"cur": "USD" | ||
} | ||
} | ||
} | ||
], | ||
"expectedBidResponses": [ | ||
{ | ||
"currency": "USD", | ||
"bids": [] | ||
} | ||
], | ||
"expectedMakeBidsErrors": [ | ||
{ | ||
"value": "unrecognized bid type in response from rtbhouse for bid test-imp-id", | ||
"comparison": "literal" | ||
} | ||
] | ||
} |
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