Skip to content

Commit

Permalink
move check_sourcedata to SourceCommandTestMixin
Browse files Browse the repository at this point in the history
  • Loading branch information
Dustin J. Mitchell committed Jun 10, 2010
1 parent a074a7e commit 5da76a2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 0 additions & 8 deletions slave/buildslave/test/util/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,3 @@ def clean_environ(self):
Temporarily clean out os.environ to { 'PWD' : '.' }
"""
self.patch(os, 'environ', { 'PWD' : '.' })

def check_sourcedata(self, _, expected_sourcedata):
"""
Assert that the sourcedata (from the patched sourcedata_fns - see
make_command) is correct. Use this as a deferred callback.
"""
self.assertEqual(self.sourcedata, expected_sourcedata)
return _
8 changes: 8 additions & 0 deletions slave/buildslave/test/util/sourcecommand.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,11 @@ def doCopy(_):
self.builder.basedir)
return r.start()
cmd.doCopy = doCopy

def check_sourcedata(self, _, expected_sourcedata):
"""
Assert that the sourcedata (from the patched functions - see
make_command) is correct. Use this as a deferred callback.
"""
self.assertEqual(self.sourcedata, expected_sourcedata)
return _

0 comments on commit 5da76a2

Please sign in to comment.