8000 Update references to mock in Iterator tests · jeffcross/github3.py@965f0bd · GitHub
[go: up one dir, main page]

Skip to content

Commit 965f0bd

Browse files
committed
Update references to mock in Iterator tests
1 parent 7f7901f commit 965f0bd

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

tests/test_structs.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
import github3
22
from github3.structs import GitHubIterator
3-
from tests.utils import BaseCase
4-
try:
5-
from unittest.mock import patch
6-
except Imp 882A ortError:
7-
from mock import patch
3+
from tests.utils import BaseCase, mock
84

95

106
class TestGitHubIterator(BaseCase):
@@ -74,7 +70,7 @@ def test_count_reaches_0(self):
7470
self.mock_assertions()
7571

7672
def test_refresh(self):
77-
with patch.object(GitHubIterator, '__iter__') as i:
73+
with mock.patch.object(GitHubIterator, '__iter__') as i:
7874
self.i.refresh()
7975
i.__iter__.assert_called()
8076

0 commit comments

Comments
 (0)
0