Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jpommerening committed Nov 30, 2013
1 parent d731589 commit 1844d49
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions master/buildbot/test/unit/test_steps_transfer.py
Expand Up @@ -22,7 +22,6 @@
import tempfile

from twisted.trial import unittest
from twisted.python import failure

from mock import Mock

Expand Down Expand Up @@ -67,7 +66,7 @@ class UploadError(object):

def __init__(self, behavior):
self.behavior = behavior
self.writer = None
self.writer = None

def __call__(self, command):
self.writer = command.args['writer']
Expand Down Expand Up @@ -529,12 +528,15 @@ class CustomStep(transfer.MultipleFileUpload):

@d.addCallback
def checkCalls(res):
self.assertEquals(step.uploadDone.call_count, 2)
self.assertEquals(step.uploadDone.call_args_list[0], ((SUCCESS, 'srcfile', os.path.join(self.destdir, 'srcfile')), {}))
self.assertEquals(step.uploadDone.call_args_list[1], ((SUCCESS, 'srcdir', os.path.join(self.destdir, 'srcdir')), {}))
self.assertEquals(step.allUploadsDone.call_count, 1)
self.assertEquals(step.allUploadsDone.call_args_list[0], ((SUCCESS, ['srcfile', 'srcdir'], self.destdir), {}))
return res
self.assertEquals(step.uploadDone.call_count, 2)
self.assertEquals(step.uploadDone.call_args_list[0],
((SUCCESS, 'srcfile', os.path.join(self.destdir, 'srcfile')), {}))
self.assertEquals(step.uploadDone.call_args_list[1],
((SUCCESS, 'srcdir', os.path.join(self.destdir, 'srcdir')), {}))
self.assertEquals(step.allUploadsDone.call_count, 1)
self.assertEquals(step.allUploadsDone.call_args_list[0],
((SUCCESS, ['srcfile', 'srcdir'], self.destdir), {}))
return res

return d

Expand Down

0 comments on commit 1844d49

Please sign in to comment.