Changeset View
Changeset View
Standalone View
Standalone View
contrib/buildbot/test/test_endpoint_buildDiff.py
Show All 15 Lines | |||||
import test.mocks.teamcity | import test.mocks.teamcity | ||||
from testutil import AnyWith | from testutil import AnyWith | ||||
class buildDiffRequestQuery(): | class buildDiffRequestQuery(): | ||||
def __init__(self): | def __init__(self): | ||||
self.stagingRef = "refs/tags/phabricator/diff/1234" | self.stagingRef = "refs/tags/phabricator/diff/1234" | ||||
self.targetPHID = "PHID-HMBT-123456" | self.targetPHID = "PHID-HMBT-123456" | ||||
self.revisionId = "D1234" | |||||
def __str__(self): | def __str__(self): | ||||
return "?{}".format("&".join("{}={}".format(key, value) | return "?{}".format("&".join("{}={}".format(key, value) | ||||
for key, value in self.__dict__.items())) | for key, value in self.__dict__.items())) | ||||
class EndpointBuildDiffTestCase(ABCBotFixture): | class EndpointBuildDiffTestCase(ABCBotFixture): | ||||
def test_buildDiff(self): | def test_buildDiff(self): | ||||
Show All 34 Lines | def test_buildDiff(self): | ||||
}, | }, | ||||
'properties': { | 'properties': { | ||||
'property': [ | 'property': [ | ||||
{ | { | ||||
'name': 'env.ABC_BUILD_NAME', | 'name': 'env.ABC_BUILD_NAME', | ||||
'value': build.name, | 'value': build.name, | ||||
}, | }, | ||||
{ | { | ||||
'name': 'env.ABC_REVISION', | |||||
'value': data.revisionId, | |||||
}, | |||||
{ | |||||
'name': 'env.harborMasterTargetPHID', | 'name': 'env.harborMasterTargetPHID', | ||||
'value': data.targetPHID, | 'value': data.targetPHID, | ||||
}, | }, | ||||
], | ], | ||||
}, | }, | ||||
}), | }), | ||||
})) | })) | ||||
for build in builds | for build in builds | ||||
Show All 25 Lines |