Skip to content

Commit c37e3fe

Browse files
committed
Fix mock import for Python 3
1 parent ca18554 commit c37e3fe

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

github_webhook/test_webhook.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
from __future__ import print_function
44

55
import unittest
6-
from mock import Mock
6+
try:
7+
from unittest.mock import Mock
8+
except ImportError:
9+
from mock import Mock
710

811
from github_webhook.webhook import Webhook
912

0 commit comments

Comments
 (0)