Skip to content

Commit 07b8e43

Browse files
committed
import mock package correctly under 2.7
1 parent 186e682 commit 07b8e43

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/test_cli.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44

55
import json
66
import os
7-
from unittest.mock import MagicMock
7+
8+
try:
9+
from unittest.mock import MagicMock
10+
except ImportError:
11+
from mock import MagicMock
812

913
import pytest
1014

0 commit comments

Comments
 (0)