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

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/w3c/deps_updater_unittest.py

Issue 2639213003: Refactoring: Split up "commit_changes_if_needed" method. (Closed)
Patch Set: Created 3 years, 11 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/w3c/deps_updater_unittest.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/deps_updater_unittest.py b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/deps_updater_unittest.py
index d2d98bce0640e794cef77fe3d1ef1a0e05c2855c..fb3940da8e83013fedd067bf335ff7eccc28b6c3 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/w3c/deps_updater_unittest.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/w3c/deps_updater_unittest.py
@@ -62,6 +62,21 @@ class DepsUpdaterTest(unittest.TestCase):
# Tests for protected methods - pylint: disable=protected-access
+ def test_commit_changes(self):
+ host = MockHost()
+ updater = DepsUpdater(host)
+ updater._has_changes = lambda: True
+ updater._commit_changes('dummy message')
+ self.assertEqual(
+ host.executive.calls,
+ [['git', 'commit', '-a', '-F', '/mock-checkout/third_party/WebKit/commit_msg']])
+
+ def test_commit_message(self):
+ updater = DepsUpdater(MockHost())
+ self.assertEqual(
+ updater._commit_message('aaaa', '1111'),
+ 'Import 1111\n\nUsing update-w3c-deps in Chromium aaaa.\n\n')
+
def test_cl_description_with_empty_environ(self):
host = MockHost()
host.executive = MockExecutive(output='Last commit message\n')

Powered by Google App Engine
This is Rietveld 408576698