Exemple #1
0
 def testRevisionRange(self):
   with mock.patch('urllib2.urlopen', mock.MagicMock(
       return_value=MOCK_RANGE_RESPONSE_FILE)):
     rev_list = chromium_revisions.revision_range(
         FIRST_REVISION, LAST_REVISION)
   commits_only = [entry['commit'] for entry in rev_list]
   for r in INTERVENING_REVISIONS:
     self.assertIn(r, commits_only)
   self.assertIn(LAST_REVISION, commits_only)
   self.assertEqual(len(INTERVENING_REVISIONS) + 1,
                    len(rev_list))
Exemple #2
0
def main(argv):
    if argv[1] == 'query_revision_info':
        print json.dumps(chromium_revisions.revision_info(argv[2]))
    elif argv[1] == 'revision_range':
        print json.dumps(chromium_revisions.revision_range(argv[2], argv[3]))
    return 0
Exemple #3
0
def main(argv):
  if argv[1] == 'query_revision_info':
    print json.dumps(chromium_revisions.revision_info(argv[2]))
  elif argv[1] == 'revision_range':
    print json.dumps(chromium_revisions.revision_range(argv[2], argv[3]))
  return 0