Changeset View
Changeset View
Standalone View
Standalone View
contrib/buildbot/test/test_phabricator.py
Show First 20 Lines • Show All 255 Lines • ▼ Show 20 Lines | def test_get_revision_changed_files(self): | ||||
[ | [ | ||||
"file1", | "file1", | ||||
"dir/file2", | "dir/file2", | ||||
]) | ]) | ||||
def test_get_file_content_from_master(self): | def test_get_file_content_from_master(self): | ||||
commit_hash = "0000000000000000000000000000000123456789" | commit_hash = "0000000000000000000000000000000123456789" | ||||
file_phid = "PHID-FILE-somefile" | file_phid = "PHID-FILE-somefile" | ||||
path = "some/file" | path = "some/file/" | ||||
self.phab.get_latest_master_commit_hash = mock.Mock() | self.phab.get_latest_master_commit_hash = mock.Mock() | ||||
self.phab.get_latest_master_commit_hash.return_value = commit_hash | self.phab.get_latest_master_commit_hash.return_value = commit_hash | ||||
self.phab.diffusion.browsequery = mock.Mock() | self.phab.diffusion.browsequery = mock.Mock() | ||||
def configure_browsequery(file_path=path, hash="abcdef"): | def configure_browsequery(file_path=path, hash="abcdef"): | ||||
self.phab.diffusion.browsequery.return_value = { | self.phab.diffusion.browsequery.return_value = { | ||||
▲ Show 20 Lines • Show All 280 Lines • Show Last 20 Lines |