Skip to content

Commit f7a5f7b

Browse files
committed
Use assert_has_calls for compatibility with Python 3.5 in fs.wrap
1 parent eb59e5d commit f7a5f7b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/test_wrap.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ def test_scandir(self):
177177
]
178178
with mock.patch.object(self.fs, "scandir", wraps=self.fs.scandir) as scandir:
179179
self.assertEqual(sorted(self.cached.scandir("/"), key=key), expected)
180-
scandir.assert_called()
180+
scandir.assert_has_calls([mock.call('/', namespaces=None, page=None)])
181181
with mock.patch.object(self.fs, "scandir", wraps=self.fs.scandir) as scandir:
182182
self.assertEqual(sorted(self.cached.scandir("/"), key=key), expected)
183183
scandir.assert_not_called()
@@ -187,7 +187,7 @@ def test_isdir(self):
187187
self.assertTrue(self.cached.isdir("foo"))
188188
self.assertFalse(self.cached.isdir("egg")) # is file
189189
self.assertFalse(self.cached.isdir("spam")) # doesn't exist
190-
scandir.assert_called()
190+
scandir.assert_has_calls([mock.call('/', namespaces=None, page=None)])
191191
with mock.patch.object(self.fs, "scandir", wraps=self.fs.scandir) as scandir:
192192
self.assertTrue(self.cached.isdir("foo"))
193193
self.assertFalse(self.cached.isdir("egg"))

0 commit comments

Comments
 (0)