From d4b77ed82566afcb5084fec0d4d88eeabed1b777 Mon Sep 17 00:00:00 2001 From: Greg Krimer Date: Tue, 10 Dec 2019 16:41:33 -0800 Subject: [PATCH] Update test_ioloop.py --- pyftpdlib/test/test_ioloop.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pyftpdlib/test/test_ioloop.py b/pyftpdlib/test/test_ioloop.py index 7c86fb9a..b8f588fb 100644 --- a/pyftpdlib/test/test_ioloop.py +++ b/pyftpdlib/test/test_ioloop.py @@ -190,7 +190,7 @@ class PollIOLoopTestCase(unittest.TestCase, BaseIOLoopTestCase): @unittest.skipIf(sys.version_info[:2] == (3, 2), "") def test_eintr_on_poll(self): # EINTR is supposed to be ignored - with mock.patch(self.poller_mock, return_vaue=mock.Mock()) as m: + with mock.patch(self.poller_mock) as m: if not PY3: m.return_value.poll.side_effect = select.error m.return_value.poll.side_effect.errno = errno.EINTR @@ -200,7 +200,7 @@ def test_eintr_on_poll(self): s.poll(0) assert m.called # ...but just that - with mock.patch(self.poller_mock, return_vaue=mock.Mock()) as m: + with mock.patch(self.poller_mock) as m: if not PY3: m.return_value.poll.side_effect = select.error m.return_value.poll.side_effect.errno = errno.EBADF @@ -212,12 +212,12 @@ def test_eintr_on_poll(self): def test_eexist_on_register(self): # EEXIST is supposed to be ignored - with mock.patch(self.poller_mock, return_vaue=mock.Mock()) as m: + with mock.patch(self.poller_mock) as m: m.return_value.register.side_effect = \ EnvironmentError(errno.EEXIST, "") s, rd, wr = self.test_register() # ...but just that - with mock.patch(self.poller_mock, return_vaue=mock.Mock()) as m: + with mock.patch(self.poller_mock) as m: m.return_value.register.side_effect = \ EnvironmentError(errno.EBADF, "") self.assertRaises(EnvironmentError, self.test_register) @@ -225,13 +225,13 @@ def test_eexist_on_register(self): def test_enoent_ebadf_on_unregister(self): # ENOENT and EBADF are supposed to be ignored for errnum in (errno.EBADF, errno.ENOENT): - with mock.patch(self.poller_mock, return_vaue=mock.Mock()) as m: + with mock.patch(self.poller_mock) as m: m.return_value.unregister.side_effect = \ EnvironmentError(errnum, "") s, rd, wr = self.test_register() s.unregister(rd) # ...but just those - with mock.patch(self.poller_mock, return_vaue=mock.Mock()) as m: + with mock.patch(self.poller_mock) as m: m.return_value.unregister.side_effect = \ EnvironmentError(errno.EEXIST, "") s, rd, wr = self.test_register() @@ -239,7 +239,7 @@ def test_enoent_ebadf_on_unregister(self): def test_enoent_on_modify(self): # ENOENT is supposed to be ignored - with mock.patch(self.poller_mock, return_vaue=mock.Mock()) as m: + with mock.patch(self.poller_mock) as m: m.return_value.modify.side_effect = \ OSError(errno.ENOENT, "") s, rd, wr = self.test_register()