A PyTest plugin which provides an FTP fixture for your tests
https://github.com/oz123/pytest-localftpserver/