'Tests the create_torrent_file() function.'

def test_create_torrent(self):

    def _on_torrent_created(result):
        lt_session = libtorrent.session()
        p = {'save_path': self._temp_dir, 'ti': libtorrent.torrent_info(result['torrent_file_path'])}
        handle = lt_session.add_torrent(p)
        self.assertTrue(handle.is_valid())
        lt_session.remove_torrent(handle)
        del lt_session
    params = {}
    result = create_torrent_file([self._test_torrent_path], params)
    _on_torrent_created(result)
