Advertisement
Guest User

Untitled

a guest
May 29th, 2015
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. def test_resumeFromResumeOffset(self):
  2. """
  3. If given a resumeOffset argument, L{DccFileReceive} will attempt to
  4. resume from that number of bytes if the file exists.
  5. """
  6. fp = FilePath(self.mktemp())
  7. fp.setContent("Twisted is awesome!")
  8. protocol = self.makeConnectedDccFileReceive(fp.path, resumeOffset=11)
  9.  
  10. self.allDataReceivedForProtocol(protocol, "amazing!")
  11.  
  12. self.assertEqual("Twisted is amazing!", fp.getContent())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement