Add /locks Telegram endpoint

This commit is contained in:
Matthias
2020-10-17 15:15:35 +02:00
parent 7caa6cfe31
commit 7a9768ffa6
5 changed files with 110 additions and 15 deletions

View File

@@ -1175,10 +1175,16 @@ def test_PairLock(default_conf):
# XRP/BTC should not be locked now
pair = 'XRP/BTC'
assert not PairLock.is_pair_locked(pair)
# Unlocking a pair that's not locked should not raise an error
PairLock.unlock_pair(pair)
PairLock.lock_pair(pair, arrow.utcnow().shift(minutes=4).datetime)
assert PairLock.is_pair_locked(pair)
# Get both locks from above
locks = PairLock.get_pair_locks(None)
assert len(locks) == 2
# Unlock original pair
pair = 'ETH/BTC'
PairLock.unlock_pair(pair)