Changeset View
Changeset View
Standalone View
Standalone View
contrib/buildbot/test/test_endpoint_land.py
Show All 26 Lines | def test_land_happyPath(self): | ||||
data = landRequestData() | data = landRequestData() | ||||
triggerBuildResponse = test.mocks.teamcity.buildInfo( | triggerBuildResponse = test.mocks.teamcity.buildInfo( | ||||
test.mocks.teamcity.buildInfo_changes(['test-change'])) | test.mocks.teamcity.buildInfo_changes(['test-change'])) | ||||
self.teamcity.session.send.return_value = triggerBuildResponse | self.teamcity.session.send.return_value = triggerBuildResponse | ||||
response = self.app.post('/land', headers=self.headers, json=data) | response = self.app.post('/land', headers=self.headers, json=data) | ||||
self.teamcity.session.send.assert_called_with(AnyWith(requests.PreparedRequest, { | self.teamcity.session.send.assert_called_with(AnyWith(requests.PreparedRequest, { | ||||
'url': 'https://teamcity.test/app/rest/buildQueue', | 'url': 'https://teamcity.test/app/rest/buildQueue', | ||||
'body': json.dumps({ | 'body': json.dumps({ | ||||
'branchName': 'master', | 'branchName': 'refs/heads/master', | ||||
'buildType': { | 'buildType': { | ||||
'id': 'BitcoinAbcLandBot', | 'id': 'BitcoinAbcLandBot', | ||||
}, | }, | ||||
'properties': { | 'properties': { | ||||
'property': [{ | 'property': [{ | ||||
'name': 'env.ABC_REVISION', | 'name': 'env.ABC_REVISION', | ||||
'value': 'D1234', | 'value': 'D1234', | ||||
}, { | }, { | ||||
▲ Show 20 Lines • Show All 41 Lines • Show Last 20 Lines |