Created
June 9, 2016 11:15
-
-
Save lfdversluis/19965643ed738c24846020e843546b97 to your computer and use it in GitHub Desktop.
Ardhi test example fix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
deferred(timeout=20) | |
def test_save_resume(self): | |
tdef = TorrentDef() | |
sourcefn = os.path.join(TESTS_DATA_DIR, 'video.avi') | |
tdef.add_content(sourcefn) | |
tdef.set_tracker("http://localhost/announce") | |
tdef.finalize() | |
torrentfn = os.path.join(self.session.get_state_dir(), "gen.torrent") | |
tdef.save(torrentfn) | |
impl = LibtorrentDownloadImpl(self.session, tdef) | |
def callback((ignored, ignored2)): | |
return impl.save_resume_data() | |
result_deferred = impl.setup(None, None, None, 0) | |
result_deferred.addCallback(callback) | |
return result_deferred |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment