test: allow maxNotional to be None
This commit is contained in:
@@ -517,12 +517,13 @@ class TestCCXTExchange:
|
|||||||
for tier in pair_tiers:
|
for tier in pair_tiers:
|
||||||
for key in ["maintenanceMarginRate", "minNotional", "maxNotional", "maxLeverage"]:
|
for key in ["maintenanceMarginRate", "minNotional", "maxNotional", "maxLeverage"]:
|
||||||
assert key in tier
|
assert key in tier
|
||||||
assert tier[key] >= 0.0
|
# maxNotional can be None (no limit)
|
||||||
assert tier["maxNotional"] > tier["minNotional"]
|
assert tier[key] is None or tier[key] >= 0.0
|
||||||
|
assert tier["maxNotional"] is None or tier["maxNotional"] > tier["minNotional"]
|
||||||
assert tier["maxLeverage"] <= oldLeverage
|
assert tier["maxLeverage"] <= oldLeverage
|
||||||
assert tier["maintenanceMarginRate"] >= oldMaintenanceMarginRate
|
assert tier["maintenanceMarginRate"] >= oldMaintenanceMarginRate
|
||||||
assert tier["minNotional"] > oldminNotional
|
assert tier["minNotional"] > oldminNotional
|
||||||
assert tier["maxNotional"] > oldmaxNotional
|
assert tier["maxNotional"] is None or tier["maxNotional"] > oldmaxNotional
|
||||||
oldLeverage = tier["maxLeverage"]
|
oldLeverage = tier["maxLeverage"]
|
||||||
oldMaintenanceMarginRate = tier["maintenanceMarginRate"]
|
oldMaintenanceMarginRate = tier["maintenanceMarginRate"]
|
||||||
oldminNotional = tier["minNotional"]
|
oldminNotional = tier["minNotional"]
|
||||||
|
|||||||
Reference in New Issue
Block a user