Skip to content

Instantly share code, notes, and snippets.

@adiroiban
Created April 20, 2015 15:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adiroiban/3c0644bb75146fdfe69b to your computer and use it in GitHub Desktop.
Save adiroiban/3c0644bb75146fdfe69b to your computer and use it in GitHub Desktop.
def test_resumeFromResumeOffset(self):
"""
If given a resumeOffset argument, L{DccFileReceive} will attempt to
resume from that number of bytes if the file exists.
"""
fp = FilePath(self.mktemp())
fp.setContent("Twisted is awesome!")
protocol = self.makeConnectedDccFileReceive(fp.path, resumeOffset=11)
self.allDataReceivedForProtocol(protocol, "amazing!")
self.assertEqual("Twisted is amazing!", fp.getContent())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment