Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(100)

Side by Side Diff: experimental/bisect_lib/fetch_revision_info_test.py

Issue 1521503002: Update bisect_lib with the changes committed in the infra/build repo. (Closed) Base URL: https://github.com/catapult-project/catapult.git@master
Patch Set: In README: add back license header, add link to Telemetry docs in catapult Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 #!/usr/bin/python
2 # Copyright 2015 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file.
5
6 import os
7 import sys
8 import unittest
9
10 _CATAPULT_PATH = os.path.abspath(os.path.join(
11 os.path.dirname(__file__), os.path.pardir, os.path.pardir))
12 sys.path.insert(0, os.path.join(_CATAPULT_PATH, 'third_party', 'mock'))
13
14 import mock
15
16 import fetch_revision_info # pylint: disable=relative-import
17
18 _TEST_DATA_PATH = os.path.join(os.path.dirname(__file__), 'test_data')
19 _MOCK_RESPONSE_PATH = os.path.join(_TEST_DATA_PATH, 'MOCK_INFO_RESPONSE_FILE')
20
21
22 class ChromiumRevisionsTest(unittest.TestCase):
23
24 def testRevisionInfo(self):
25 commit_hash = 'c89130e28fd01062104e1be7f3a6fc3abbb80ca9'
26 with mock.patch('urllib2.urlopen', mock.MagicMock(
27 return_value=open(_MOCK_RESPONSE_PATH))):
28 revision_info = fetch_revision_info.FetchRevisionInfo(
29 commit_hash, depot_name='chromium')
30 self.assertEqual(
31 {
32 'body': ('\nHiding actions without the toolbar redesign '
33 'means removing them entirely, so if\nthey exist '
34 'in the toolbar, they are considered \'visible\' '
35 '(even if they are in\nthe chevron).\n\n'
36 'BUG=544859\nBUG=548160\n\nReview URL: '
37 'https://codereview.chromium.org/1414343003\n\n'
38 'Cr-Commit-Position: refs/heads/master@{#356400}'),
39 'date': 'Tue Oct 27 21:26:30 2015',
40 'subject': ('[Extensions] Fix hiding browser actions '
41 'without the toolbar redesign'),
42 'email': 'rdevlin.cronin@chromium.org',
43 'author': 'rdevlin.cronin'
44 },
45 revision_info)
46
47
48 if __name__ == '__main__':
49 unittest.main()
OLDNEW
« no previous file with comments | « experimental/bisect_lib/fetch_revision_info.py ('k') | experimental/bisect_lib/test_data/MOCK_INFO_RESPONSE_FILE » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698