Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

Commit 9c45f89

Browse files
committed
Use correct priceModifier field for v5
1 parent 1677a62 commit 9c45f89

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

qa/eth_market_price_modifier.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def run_test(self):
4343
listing_json["metadata"]["coinDivisibility"] = 18
4444
listing_json["metadata"]["acceptedCurrencies"] = ["T" + self.cointype]
4545
listing_json_with_modifier = deepcopy(listing_json)
46-
listing_json_with_modifier["metadata"]["priceModifier"] = self.price_modifier
46+
listing_json_with_modifier["item"]["priceModifier"] = self.price_modifier
4747

4848
api_url = vendor["gateway_url"] + "ob/listing"
4949
r = requests.post(api_url, data=json.dumps(listing_json, indent=4))
@@ -136,7 +136,7 @@ def run_test(self):
136136
# Check that modified price is different than regular price
137137
pct_change = round((payment_amount-payment_amount_with_modifier) / payment_amount * -100, 2)
138138
if pct_change != self.price_modifier:
139-
raise TestFailure("EthMarketPriceModifierTest - FAIL: Incorrect price modification: wanted %f but got %f", self.price_modifier, pct_change)
139+
raise TestFailure(f"EthMarketPriceModifierTest - FAIL: Incorrect price modification: wanted {self.price_modifier} but got {pct_change}")
140140

141141
print("EthMarketPriceModifierTest - PASS")
142142

0 commit comments

Comments
 (0)