-
Notifications
You must be signed in to change notification settings - Fork 742
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mansi's feedback in regards of file and directory naming and addition…
…al test cases
- Loading branch information
Gus Carreon
authored and
Gus Carreon
committed
Jun 9, 2021
1 parent
32a3a22
commit c9ee8e1
Showing
15 changed files
with
225 additions
and
2 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
File renamed without changes.
52 changes: 52 additions & 0 deletions
52
...currency-conversion/custom-rates/errors/custom-rates-currency-missing-usepbs-default.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,52 @@ | ||
{ | ||
"description": "currency in request.cur cannot be converted because conversion rate not found in either custom currency rates nor server rates. usepbsrates defaults to true", | ||
"config": { | ||
"currencyRates":{ | ||
"USD": { | ||
"MXN": 2.00 | ||
} | ||
}, | ||
"mockBidder": { | ||
"currency": "USD", | ||
"price": 1.00 | ||
} | ||
}, | ||
"mockBidRequest": { | ||
"id": "some-request-id", | ||
"site": { | ||
"page": "test.somepage.com" | ||
}, | ||
"imp": [ | ||
{ | ||
"id": "my-imp-id", | ||
"video": { | ||
"mimes": [ | ||
"video/mp4" | ||
] | ||
}, | ||
"ext": { | ||
"appnexus": { | ||
"placementId": 12883451 | ||
} | ||
} | ||
} | ||
], | ||
"cur": ["GBP"], | ||
"ext": { | ||
"prebid": { | ||
"aliases": { | ||
"unknown": "appnexus" | ||
}, | ||
"currency": { | ||
"rates": { | ||
"USD": { | ||
"MXN": 5.00 | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"expectedReturnCode": 500, | ||
"expectedErrorMessage": "Critical error while running the auction: Can't produce bid with no valid currency to use or currency conversion to convert to." | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
70 changes: 70 additions & 0 deletions
70
...sample-requests/currency-conversion/custom-rates/valid/server-rates-usepbsrates-true.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,70 @@ | ||
{ | ||
"description": "Despite being more expensive, custom conversion rate overrides that of the currency conversion service. usepbsrates was true", | ||
"config": { | ||
"currencyRates":{ | ||
"USD": { | ||
"MXN": 2.00 | ||
} | ||
}, | ||
"mockBidder": { | ||
"currency": "USD", | ||
"price": 1.00 | ||
} | ||
}, | ||
"mockBidRequest": { | ||
"id": "some-request-id", | ||
"site": { | ||
"page": "test.somepage.com" | ||
}, | ||
"imp": [ | ||
{ | ||
"id": "my-imp-id", | ||
"video": { | ||
"mimes": [ | ||
"video/mp4" | ||
] | ||
}, | ||
"ext": { | ||
"appnexus": { | ||
"placementId": 12883451 | ||
} | ||
} | ||
} | ||
], | ||
"cur": ["MXN"], | ||
"ext": { | ||
"prebid": { | ||
"aliases": { | ||
"unknown": "appnexus" | ||
}, | ||
"currency": { | ||
"rates": { | ||
"USD": { | ||
"CAD": 5.00 | ||
} | ||
}, | ||
"usepbsrates": true | ||
} | ||
} | ||
} | ||
}, | ||
"expectedBidResponse": { | ||
"id":"some-request-id", | ||
"bidid":"test bid id", | ||
"cur": "MXN", | ||
"nbr":0, | ||
"seatbid": [ | ||
{ | ||
"bid": [ | ||
{ | ||
"id": "appnexus-bid", | ||
"impid": "", | ||
"price": 2.00 | ||
} | ||
], | ||
"seat": "appnexus-bids" | ||
} | ||
] | ||
}, | ||
"expectedReturnCode": 200 | ||
} |
38 changes: 38 additions & 0 deletions
38
...openrtb2/sample-requests/currency-conversion/server-rates/errors/no-conversion-found.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,38 @@ | ||
{ | ||
"description": "bid request calls for a bid in foreign currency MXN but conversion rate is not found in the currency conversion service.", | ||
"config": { | ||
"currencyRates":{ | ||
"USD": { | ||
"GBP": 0.80 | ||
} | ||
}, | ||
"mockBidder": { | ||
"currency": "USD", | ||
"price": 1.00 | ||
} | ||
}, | ||
"mockBidRequest": { | ||
"id": "some-request-id", | ||
"site": { | ||
"page": "test.somepage.com" | ||
}, | ||
"cur": ["MXN"], | ||
"imp": [ | ||
{ | ||
"id": "my-imp-id", | ||
"video": { | ||
"mimes": [ | ||
"video/mp4" | ||
] | ||
}, | ||
"ext": { | ||
"appnexus": { | ||
"placementId": 12883451 | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
"expectedReturnCode": 500, | ||
"expectedErrorMessage": "Critical error while running the auction: Can't produce bid with no valid currency to use or currency conversion to convert to." | ||
} |
55 changes: 55 additions & 0 deletions
55
...ts/openrtb2/sample-requests/currency-conversion/server-rates/valid/simple-conversion.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 @@ | ||
{ | ||
"description": "bid request calls for a bid in foreign currency but mockbidder bids in USD. Conversion rate is applied", | ||
"config": { | ||
"currencyRates":{ | ||
"USD": { | ||
"MXN": 2.00 | ||
} | ||
}, | ||
"mockBidder": { | ||
"currency": "USD", | ||
"price": 1.00 | ||
} | ||
}, | ||
"mockBidRequest": { | ||
"id": "some-request-id", | ||
"site": { | ||
"page": "test.somepage.com" | ||
}, | ||
"cur": ["MXN"], | ||
"imp": [ | ||
{ | ||
"id": "my-imp-id", | ||
"video": { | ||
"mimes": [ | ||
"video/mp4" | ||
] | ||
}, | ||
"ext": { | ||
"appnexus": { | ||
"placementId": 12883451 | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
"expectedBidResponse": { | ||
"id":"some-request-id", | ||
"bidid":"test bid id", | ||
"cur": "MXN", | ||
"nbr":0, | ||
"seatbid": [ | ||
{ | ||
"bid": [ | ||
{ | ||
"id": "appnexus-bid", | ||
"impid": "", | ||
"price": 2.00 | ||
} | ||
], | ||
"seat": "appnexus-bids" | ||
} | ||
] | ||
}, | ||
"expectedReturnCode": 200 | ||
} |