Changeset View
Changeset View
Standalone View
Standalone View
contrib/buildbot/test/test_endpoint_buildDiff.py
Show First 20 Lines • Show All 64 Lines • ▼ Show 20 Lines | def test_buildDiff(self): | ||||
response = self.app.post( | response = self.app.post( | ||||
'/buildDiff{}'.format(data), | '/buildDiff{}'.format(data), | ||||
headers=self.headers) | headers=self.headers) | ||||
self.assertEqual(response.status_code, 200) | self.assertEqual(response.status_code, 200) | ||||
self.phab.differential.getcommitpaths.assert_called() | self.phab.differential.getcommitpaths.assert_called() | ||||
self.phab.get_file_content_from_master.assert_called() | self.phab.get_file_content_from_master.assert_called() | ||||
if len(expectedBuilds) == 0: | |||||
self.phab.harbormaster.sendmessage.assert_called_with( | |||||
buildTargetPHID=data.targetPHID, type="pass") | |||||
expected_calls = [ | expected_calls = [ | ||||
call(AnyWith(requests.PreparedRequest, { | call(AnyWith(requests.PreparedRequest, { | ||||
"url": "https://teamcity.test/app/rest/buildQueue", | "url": "https://teamcity.test/app/rest/buildQueue", | ||||
"body": json.dumps({ | "body": json.dumps({ | ||||
"branchName": data.stagingRef, | "branchName": data.stagingRef, | ||||
"buildType": { | "buildType": { | ||||
"id": "BitcoinABC_BitcoinAbcStaging", | "id": "BitcoinABC_BitcoinAbcStaging", | ||||
}, | }, | ||||
▲ Show 20 Lines • Show All 81 Lines • Show Last 20 Lines |