Fix failing test in python 3.7

can't use Magicmock in 3.7 (works in 3.8 though).
This commit is contained in:
Matthias
2020-06-28 20:17:03 +02:00
parent c6124180fe
commit 4d9ecf137b
2 changed files with 2 additions and 2 deletions

View File

@@ -110,7 +110,7 @@ def retrier_async(f):
count -= 1
kwargs.update({'count': count})
logger.warning('retrying %s() still for %s times', f.__name__, count)
if isinstance(ex, DDosProtection) or isinstance(ex, RetryableOrderError):
if isinstance(ex, DDosProtection):
await asyncio.sleep(calculate_backoff(count + 1, API_RETRY_COUNT))
return await wrapper(*args, **kwargs)
else: