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

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: Use stdin pipe. 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
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/w3c/deps_updater.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..9ed58c84a263065ea5dd9c51a00cb8a541460e01 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', '--all', '-F', '-']])
+
+ 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')
« no previous file with comments | « third_party/WebKit/Tools/Scripts/webkitpy/w3c/deps_updater.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698