def test_get_laster_master_commit_hash(self):
    with self.assertRaises(AssertionError):
        self.phab.get_latest_master_commit_hash()
    self.phab.diffusion.commit.search.return_value = test.mocks.phabricator.Result([{'id': 1234, 'type': 'CMIT', 'phid': 'PHID-CMIT-abcdef', 'fields': {'identifier': '0000000000000000000000000000000123456789', 'repositoryPHID': 'PHID-REPO-abcrepo'}}])
    commit_hash = self.phab.get_latest_master_commit_hash()
    self.phab.diffusion.commit.search.assert_called_with(constraints={'repositories': [BITCOIN_ABC_REPO]}, limit=1)
    self.assertEqual(commit_hash, '0000000000000000000000000000000123456789')
def test_get_laster_master_commit_hash(self):
    with self.assertRaises(AssertionError):
        self.phab.get_latest_master_commit_hash()
    self.phab.diffusion.commit.search.return_value = test.mocks.phabricator.Result([{'id': 1234, 'type': 'CMIT', 'phid': 'PHID-CMIT-abcdef', 'fields': {'identifier': '0000000000000000000000000000000123456789', 'repositoryPHID': 'PHID-REPO-abcrepo'}}])
    commit_hash = self.phab.get_latest_master_commit_hash()
    self.phab.diffusion.commit.search.assert_called_with(constraints={'repositories': [BITCOIN_ABC_REPO]}, limit=1)
    self.assertEqual(commit_hash, '0000000000000000000000000000000123456789')