Skip to content

Commit

Permalink
Tests: added python 2.7 fallback for mock
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristianKreuzberger committed Mar 13, 2017
1 parent 1bcf1d8 commit b202608
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@
from rest_framework import status
from rest_framework.test import APITestCase
from django_rest_multitokenauth.models import MultiToken
from unittest.mock import patch
try:
from unittest.mock import patch
except:
# Python 2.7 fallback
from mock import patch

# try getting reverse from django.urls
try:
Expand Down

0 comments on commit b202608

Please sign in to comment.