def test_get_writer_defers(self): wrq_datagram = WRQDatagram('foobar', 'NetASCiI', {}) wrq_addr = ('127.0.0.1', 1069) wrq_mode = "octet" d = self.tftp._startSession(wrq_datagram, wrq_addr, wrq_mode) self.assertFalse(d.called) self.clock.advance(1) self.assertTrue(d.called) self.assertTrue(IWriter.providedBy(d.result.backend))
def test_get_writer_defers(self): wrq_datagram = WRQDatagram(b'foobar', b'NetASCiI', {}) wrq_addr = ('127.0.0.1', 1069) wrq_mode = b"octet" d = self.tftp._startSession(wrq_datagram, wrq_addr, wrq_mode) self.assertFalse(d.called) self.clock.advance(1) self.assertTrue(d.called) self.assertTrue(IWriter.providedBy(d.result.backend))
def test_write_supported_by_default(self): b = FilesystemSynchronousBackend(self.temp_dir.path) writer = yield b.get_writer(b'dir/bar') self.assertTrue(IWriter.providedBy(writer))
def test_write_supported_by_default(self): b = FilesystemSynchronousBackend(self.temp_dir.path) writer = yield b.get_writer('dir/bar') self.assertTrue(IWriter.providedBy(writer))