(self)
| 631 | self.assertEqual(self.server.handler_instance.rest, str(r)) |
| 632 | |
| 633 | def test_storlines(self): |
| 634 | data = RETR_DATA.replace('\r\n', '\n').encode(self.client.encoding) |
| 635 | f = io.BytesIO(data) |
| 636 | self.client.storlines('stor', f) |
| 637 | self.check_data(self.server.handler_instance.last_received_data, |
| 638 | RETR_DATA.encode(self.server.encoding)) |
| 639 | # test new callback arg |
| 640 | flag = [] |
| 641 | f.seek(0) |
| 642 | self.client.storlines('stor foo', f, callback=lambda x: flag.append(None)) |
| 643 | self.assertTrue(flag) |
| 644 | |
| 645 | f = io.StringIO(RETR_DATA.replace('\r\n', '\n')) |
| 646 | # storlines() expects a binary file, not a text file |
| 647 | with warnings_helper.check_warnings(('', BytesWarning), quiet=True): |
| 648 | self.assertRaises(TypeError, self.client.storlines, 'stor foo', f) |
| 649 | |
| 650 | def test_nlst(self): |
| 651 | self.client.nlst() |
nothing calls this directly
no test coverage detected