Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pytest
requests-mock
mock
mock;python_version < '3.3'
bandit==1.7.5;python_version > '3'
responses
8 changes: 6 additions & 2 deletions tests/test_purge.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
import pytest
import requests_mock
import mock
import responses

try:
from time import monotonic
except ImportError:
from monotonic import monotonic

try:
from unittest.mock import patch
except ImportError:
from mock import patch

from fastpurge import FastPurgeClient, FastPurgeError

# pylint: disable=unused-argument
Expand Down Expand Up @@ -41,7 +45,7 @@ def requests_mocker():
def no_thread_retries():
"""Suppress retries for the duration of this fixture."""

with mock.patch('more_executors.retry.ExceptionRetryPolicy') as policy_class:
with patch('more_executors.retry.ExceptionRetryPolicy') as policy_class:
policy = policy_class.return_value
policy.should_retry.return_value = False
policy.sleep_time.return_value = 0.1
Expand Down