def test_download(self): from plone.resourceeditor.browser import FileManager r = self._make_directory() r.writeFile('test.txt', 'foo') view = FileManager(r, self.layer['request']) self.assertEqual('foo', view.download('/test.txt'))
def test_download(self): from plone.resourceeditor.browser import FileManager r = self._make_directory() r.writeFile('test.txt', b'foo') view = FileManager(r, self.layer['request']) self.assertEqual(b'foo', view.download('/test.txt'))
def test_download(self): from plone.resourceeditor.browser import FileManager r = self._make_directory() r.writeFile("test.txt", "foo") view = FileManager(r, self.layer['request']) self.assertEqual("foo", view.download("/test.txt"))