8000 Add support for Python2.7 in mock. · ciguler/testing-python-apps@e9e6930 · GitHub
[go: up one dir, main page]

Skip to content

Commit e9e6930

Browse files
committed
Add support for Python2.7 in mock.
1 parent dccb977 commit e9e6930

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

section3/video_code/tests/system/app_test.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
from unittest import TestCase
2-
from unittest.mock import patch
2+
try:
3+
from unittest.mock import patch
4+
except ImportError:
5+
from mock import patch
36

47
from section3.video_code import app
58
from blog import Blog

0 commit comments

Comments
 (0)
0