| OLD | NEW |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 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 unittest | 5 import unittest |
| 6 from webkitpy.w3c.local_wpt import LocalWPT | 6 from webkitpy.w3c.local_wpt import LocalWPT |
| 7 from webkitpy.common.host_mock import MockHost | 7 from webkitpy.common.host_mock import MockHost |
| 8 from webkitpy.common.system.executive_mock import MockExecutive2 | 8 from webkitpy.common.system.executive_mock import MockExecutive2 |
| 9 from webkitpy.common.system.filesystem_mock import MockFileSystem | 9 from webkitpy.common.system.filesystem_mock import MockFileSystem |
| 10 | 10 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 | 76 |
| 77 commit = local_wpt.most_recent_chromium_commit() | 77 commit = local_wpt.most_recent_chromium_commit() |
| 78 self.assertEqual(commit, (None, None)) | 78 self.assertEqual(commit, (None, None)) |
| 79 | 79 |
| 80 def test_create_branch_with_patch(self): | 80 def test_create_branch_with_patch(self): |
| 81 host = MockHost() | 81 host = MockHost() |
| 82 host.filesystem = MockFileSystem() | 82 host.filesystem = MockFileSystem() |
| 83 | 83 |
| 84 local_wpt = LocalWPT(host) | 84 local_wpt = LocalWPT(host) |
| 85 | 85 |
| 86 local_wpt.create_branch_with_patch('branch-name', 'message', 'patch') | 86 local_branch_name = local_wpt.create_branch_with_patch('message', 'patch
') |
| 87 self.assertEqual(len(host.executive.calls), 9) | 87 self.assertEqual(len(host.executive.calls), 9) |
| 88 self.assertEqual(local_branch_name, 'chromium-export-try') |
| 88 # TODO(jeffcarp): Add more specific assertions | 89 # TODO(jeffcarp): Add more specific assertions |
| OLD | NEW |