def test_openForReadingOnDirectory(self):
        """
        openForReading should not work on directory.
        """
        self.createDirectory('ned')
        d = self.shell.openForReading(('ned',))
        return self.assertFailure(d, ftp.IsADirectoryError)

        openForReading should not work on directory.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_ftp.py