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

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/common/net/git_cl_unittest.py

Issue 2715093002: Add back use of --auth-refresh-token-json for wpt-import (Closed)
Patch Set: Update test Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Tools/Scripts/webkitpy/common/net/git_cl_unittest.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/common/net/git_cl_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/common/net/git_cl_unittest.py
index b30bccdc2b94ba347b02f5a4c73edc71059fdd24..f2ddfb52f6570ceafcee20171138e05fe4f26205 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/common/net/git_cl_unittest.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/common/net/git_cl_unittest.py
@@ -20,12 +20,21 @@ class GitCLTest(unittest.TestCase):
self.assertEqual(output, 'mock-output')
self.assertEqual(host.executive.calls, [['git', 'cl', 'command']])
- def test_run_basic(self):
+ def test_run_with_auth(self):
host = MockHost()
host.executive = MockExecutive(output='mock-output')
- git_cl = GitCL(host)
- git_cl.run(['upload'])
- self.assertEqual(host.executive.calls, [['git', 'cl', 'upload']])
+ git_cl = GitCL(host, auth_refresh_token_json='token.json')
+ git_cl.run(['try', '-b', 'win10_blink_rel'])
+ self.assertEqual(
+ host.executive.calls,
+ [['git', 'cl', 'try', '-b', 'win10_blink_rel', '--auth-refresh-token-json', 'token.json']])
+
+ def test_some_commands_not_run_with_auth(self):
+ host = MockHost()
+ host.executive = MockExecutive(output='mock-output')
+ git_cl = GitCL(host, auth_refresh_token_json='token.json')
+ git_cl.run(['issue'])
+ self.assertEqual(host.executive.calls, [['git', 'cl', 'issue']])
def test_get_issue_number(self):
host = MockHost()

Powered by Google App Engine
This is Rietveld 408576698