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

Side by Side Diff: appengine/findit/gitiles/test/git_repository_test.py

Issue 2344443005: [Findit] Factoring the gitiles (etc) stuff out into its own directory (Closed)
Patch Set: rebase-update Created 4 years, 2 months 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
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import base64 5 import base64
6 from datetime import datetime 6 from datetime import datetime
7 import json 7 import json
8 import re 8 import re
9 9
10 from testing_utils import testing 10 from testing_utils import testing
11 11
12 from common import git_repository 12 from gitiles import git_repository
13 from gitiles.change_log import ChangeLog
14 # TODO(wrengr): we shouldn't have anything in the gitiles directory
15 # depend on stuff in the common directory.
13 from common import retry_http_client 16 from common import retry_http_client
14 from common.change_log import ChangeLog
15 17
16 18
17 COMMIT_MESSAGE = ('Add popover for snapshot canvas log.\n\n' 19 COMMIT_MESSAGE = ('Add popover for snapshot canvas log.\n\n'
18 'Review URL: https://codereview.chromium.org/320423004\n\n' 20 'Review URL: https://codereview.chromium.org/320423004\n\n'
19 'Review URL: https://codereview.chromium.org/328113005\n\n' 21 'Review URL: https://codereview.chromium.org/328113005\n\n'
20 'Cr-Commit-Position: refs/heads/master@{#175976}') 22 'Cr-Commit-Position: refs/heads/master@{#175976}')
21 23
22 COMMIT_LOG = """)]}' 24 COMMIT_LOG = """)]}'
23 { 25 {
24 "commit": "bcfd5a12eea05588aee98b7cf7e032d8cb5b58bb", 26 "commit": "bcfd5a12eea05588aee98b7cf7e032d8cb5b58bb",
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 return {'log': [log2]} 561 return {'log': [log2]}
560 562
561 return {'log': [log1], 'next': 'next_page_commit'} 563 return {'log': [log1], 'next': 'next_page_commit'}
562 564
563 self.mock(git_repository.GitRepository, '_SendRequestForJsonResponse', 565 self.mock(git_repository.GitRepository, '_SendRequestForJsonResponse',
564 _MockSendRequestForJsonResponse) 566 _MockSendRequestForJsonResponse)
565 567
566 changelogs = self.git_repo.GetChangeLogs('0', '2') 568 changelogs = self.git_repo.GetChangeLogs('0', '2')
567 569
568 self.assertEqual(len(changelogs), 2) 570 self.assertEqual(len(changelogs), 2)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698