Skip to content

Commit

Permalink
Don't use deprecated name SetProperty in regression tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
tomprince committed Jul 13, 2013
1 parent e8147cc commit 7dfd054
Showing 1 changed file with 5 additions and 5 deletions.
Expand Up @@ -15,7 +15,7 @@

from twisted.trial import unittest

from buildbot.steps.shell import ShellCommand, SetProperty
from buildbot.steps.shell import ShellCommand, SetPropertyFromCommand
from buildbot.process.properties import WithProperties, Properties
from buildbot.process.factory import BuildFactory
from buildbot.sourcestamp import SourceStamp
Expand Down Expand Up @@ -76,7 +76,7 @@ def mergeReasons(self, others):
class TestShellCommandProperties(unittest.TestCase):
def testCommand(self):
f = BuildFactory()
f.addStep(SetProperty(command=["echo", "value"], property="propname"))
f.addStep(SetPropertyFromCommand(command=["echo", "value"], property="propname"))
f.addStep(ShellCommand(command=["echo", WithProperties("%(propname)s")]))

ss = SourceStamp()
Expand All @@ -94,7 +94,7 @@ def testCommand(self):
class TestSetProperty(unittest.TestCase):
def testGoodStep(self):
f = BuildFactory()
f.addStep(SetProperty(command=["echo", "value"], property="propname"))
f.addStep(SetPropertyFromCommand(command=["echo", "value"], property="propname"))

ss = SourceStamp()

Expand All @@ -109,8 +109,8 @@ def testGoodStep(self):

def testErrorBothSet(self):
self.assertRaises(config.ConfigErrors,
SetProperty, command=["echo", "value"], property="propname", extract_fn=lambda x:{"propname": "hello"})
SetPropertyFromCommand, command=["echo", "value"], property="propname", extract_fn=lambda x:{"propname": "hello"})

def testErrorNoneSet(self):
self.assertRaises(config.ConfigErrors,
SetProperty, command=["echo", "value"])
SetPropertyFromCommand, command=["echo", "value"])

0 comments on commit 7dfd054

Please sign in to comment.