Skip to content

Commit

Permalink
add a few extra WithProperties tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tomprince authored and djmitche committed Sep 3, 2012
1 parent 8651316 commit 331383f
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions master/buildbot/test/unit/test_process_properties.py
Expand Up @@ -949,6 +949,25 @@ def testLambdaUseExisting(self):
d.addCallback(self.failUnlessEqual, '30')
return d

def testColon(self):
self.props.setProperty('some:property', 10, 'test')
command = WithProperties('%(some:property:-with-default)s')
d = self.build.render(command)
d.addCallback(self.failUnlessEqual, '10')
return d

def testColon_default(self):
command = WithProperties('%(some:property:-with-default)s')
d = self.build.render(command)
d.addCallback(self.failUnlessEqual, 'with-default')
return d

def testColon_colon(self):
command = WithProperties('%(some:property:-with:default)s')
d = self.build.render(command)
d.addCallback(self.failUnlessEqual, 'with:default')
return d

class TestProperties(unittest.TestCase):
def setUp(self):
self.props = Properties()
Expand Down

0 comments on commit 331383f

Please sign in to comment.