Soak up protocol responses after a cancel to avoid outputting garbage to the shell after the kitten exits

This commit is contained in:
Kovid Goyal
2021-09-11 10:14:21 +05:30
parent 74c1476f6d
commit 9db9638bc3
3 changed files with 37 additions and 8 deletions

View File

@@ -118,7 +118,7 @@ class TestFileTransmission(BaseTest):
ft.handle_serialized_command(serialized_cmd(action='data', data='abcd'))
self.assertTrue(os.path.exists(dest))
ft.handle_serialized_command(serialized_cmd(action='cancel'))
self.ae(ft.test_responses, [response(status='OK'), response(status='STARTED', name=dest)])
self.ae(ft.test_responses, [response(status='OK'), response(status='STARTED', name=dest), response(status='CANCELED')])
self.assertFalse(ft.active_receives)
# compress with zlib
ft = FileTransmission()