diff options
author | Michael P. Soulier <msoulier@digitaltorque.ca> | 2013-05-15 10:17:09 -0400 |
---|---|---|
committer | Michael P. Soulier <msoulier@digitaltorque.ca> | 2013-05-15 10:17:09 -0400 |
commit | f3d2fc4c62c1e64dd49adfaf8e65097eb8ea307b (patch) | |
tree | 867a9b4a794c2b847b612ebae43236f30f5b9574 | |
parent | 3e0a9671338067560e9c33e439ef4f5160f13647 (diff) | |
download | tftpy-baserock/morph.tar.gz |
Increasing test file size to 50MB and removed the assertion of a block zero,baserock/morph
as that will happen at block number rollover. Closes issue #36.
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | t/100KBFILE | bin | 102400 -> 0 bytes | |||
-rw-r--r-- | t/foo/100KBFILE | bin | 102400 -> 0 bytes | |||
-rw-r--r-- | t/test.py | 14 | ||||
-rw-r--r-- | tftpy/TftpStates.py | 1 |
5 files changed, 8 insertions, 9 deletions
@@ -7,7 +7,7 @@ sdist: PYTHONPATH=$(PYTHONPATH) $(PY) setup.py sdist test: - PYTHONPATH=$(PYTHONPATH) $(PY) t/test.py + PYTHONPATH=$(PYTHONPATH) $(PY) t/test.py 2>&1 | tee test.log clean: rm -rf dist src tftpy-doc* MANIFEST diff --git a/t/100KBFILE b/t/100KBFILE Binary files differdeleted file mode 100644 index 77efc8d..0000000 --- a/t/100KBFILE +++ /dev/null diff --git a/t/foo/100KBFILE b/t/foo/100KBFILE Binary files differdeleted file mode 100644 index 77efc8d..0000000 --- a/t/foo/100KBFILE +++ /dev/null @@ -145,7 +145,7 @@ class TestTftpyState(unittest.TestCase): """Fire up a client and a server and do an upload.""" root = '/tmp' home = os.path.dirname(os.path.abspath(__file__)) - filename = '100KBFILE' + filename = '50MBFILE' input_path = os.path.join(home, filename) if not input: input = input_path @@ -183,7 +183,7 @@ class TestTftpyState(unittest.TestCase): # parent - let the server start try: time.sleep(1) - client.download('100KBFILE', + client.download('50MBFILE', output) finally: os.kill(child_pid, 15) @@ -207,11 +207,11 @@ class TestTftpyState(unittest.TestCase): self.clientServerUploadOptions({}) def testClientServerUploadFileObj(self): - fileobj = open('/tmp/100KBFILE', 'r') + fileobj = open('/tmp/50MBFILE', 'r') self.clientServerUploadOptions({}, input=fileobj) def testClientServerUploadWithSubdirs(self): - self.clientServerUploadOptions({}, transmitname='foo/bar/100KBFILE') + self.clientServerUploadOptions({}, transmitname='foo/bar/50MBFILE') def testClientServerUploadOptions(self): for blksize in [512, 1024, 2048, 4096]: @@ -237,7 +237,7 @@ class TestTftpyState(unittest.TestCase): tftpy.TftpContextServer) ) rrq = tftpy.TftpPacketRRQ() - rrq.filename = '100KBFILE' + rrq.filename = '50MBFILE' rrq.mode = 'octet' rrq.options = {} @@ -274,7 +274,7 @@ class TestTftpyState(unittest.TestCase): tftpy.TftpContextServer) ) rrq = tftpy.TftpPacketRRQ() - rrq.filename = 'foo/100KBFILE' + rrq.filename = 'foo/50MBFILE' rrq.mode = 'octet' rrq.options = {} @@ -324,7 +324,7 @@ class TestTftpyState(unittest.TestCase): timeout, root) rrq = tftpy.TftpPacketRRQ() - rrq.filename = '100KBFILE' + rrq.filename = '50MBFILE' rrq.mode = 'octet' rrq.options = {} diff --git a/tftpy/TftpStates.py b/tftpy/TftpStates.py index 8e4ad1e..bfd10c7 100644 --- a/tftpy/TftpStates.py +++ b/tftpy/TftpStates.py @@ -84,7 +84,6 @@ class TftpState(object): import time log.debug("Deliberately delaying 10 seconds...") time.sleep(10) - tftpassert( blocknumber > 0, "There is no block zero!" ) dat = None blksize = self.context.getBlocksize() buffer = self.context.fileobj.read(blksize) |