- get_ticker.side_effect = [
- { "average": D("0.0001") },
- { "average": D("0.000001") }
- ]
+ def _get_ticker(c1, c2, market):
+ if c1 == "USDT" and c2 == "BTC":
+ return { "average": D("0.0001") }
+ if c1 == "XVG" and c2 == "BTC":
+ return { "average": D("0.000001") }
+ if c1 == "XEM" and c2 == "BTC":
+ return { "average": D("0.001") }
+ raise Exception("Should be called with {}, {}".format(c1, c2))
+ get_ticker.side_effect = _get_ticker
+