From 682aa37ee2ed8251d2a11b0b1d3d0c1c6e51e8a2 Mon Sep 17 00:00:00 2001 From: Giampaolo Rodola Date: Fri, 21 Jun 2024 19:10:53 +0200 Subject: [PATCH] adjust test not to use error_temp --- pyftpdlib/test/test_functional.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pyftpdlib/test/test_functional.py b/pyftpdlib/test/test_functional.py index 823df921..27aaa91a 100644 --- a/pyftpdlib/test/test_functional.py +++ b/pyftpdlib/test/test_functional.py @@ -2084,9 +2084,10 @@ def test_on_incomplete_file_received(self): break # If a data transfer is in progress server is supposed to send # a 426 reply followed by a 226 reply. - with pytest.raises(ftplib.error_temp): - self.client.getresp() # 426 - assert self.client.getresp()[:3] == "226" + resp = self.client.getmultiline() + assert resp == "426 Transfer aborted via ABOR." + resp = self.client.getmultiline() + assert resp.startswith("226") self.read_file( 'on_connect,on_login:%s,on_incomplete_file_received:%s,' % (USER, self.testfn2)