Skip to content

Commit 33b55e2

Browse files
Martin Larraldewillmcgugan
authored andcommitted
Fix tests against Python 3.7 (#198)
1 parent 997ee16 commit 33b55e2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/test_opener.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,11 @@ def test_entry_point_load_error(self):
204204

205205
def test_entry_point_type_error(self):
206206

207-
entry_point = mock.MagicMock()
207+
class NotAnOpener(object):
208+
pass
208209

210+
entry_point = mock.MagicMock()
211+
entry_point.load = mock.MagicMock(return_value=NotAnOpener)
209212
iter_entry_points = mock.MagicMock(return_value=iter([entry_point]))
210213

211214
with mock.patch('pkg_resources.iter_entry_points', iter_entry_points):

0 commit comments

Comments
 (0)