django-axes/axes/tests/compatibility.py
Martin Bächtold 687e51eae0
Test against Python 2.7.
As discussed in https://github.com/jazzband/django-axes/issues/264 and https://github.com/jazzband/django-axes/issues/266.

We need to install `mock` when testing against Python 2.7 because `mock` has been added to the standard lib only starting with Python 3.3.
2017-11-23 07:44:15 +01:00

4 lines
88 B
Python

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