| OLD | NEW |
| (Empty) | |
| 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 |
| 3 # found in the LICENSE file. |
| 4 |
| 5 import unittest |
| 6 from webkitpy.w3c.sync import TestExporter |
| 7 from webkitpy.common.host_mock import MockHost |
| 8 from webkitpy.common.system.executive_mock import MockExecutive2 |
| 9 from webkitpy.common.system.filesystem_mock import MockFileSystem |
| 10 |
| 11 |
| 12 class TestExporterTest(unittest.TestCase): |
| 13 |
| 14 def test_pulls_if_wpt_exists(self): |
| 15 host = MockHost() |
| 16 host.executive = MockExecutive2() |
| 17 host.filesystem = MockFileSystem(files={ |
| 18 '/mock-checkout/third_party/WebKit/wpt': '' |
| 19 }) |
| 20 exporter = TestExporter(host, options={}) |
| 21 exporter.pull_down_local_wpt() |
| 22 self.assertEqual(len(host.executive.calls), 1) |
| 23 self.assertEqual(host.executive.calls[0][1], 'pull') |
| 24 |
| 25 def test_clones_if_wpt_does_not_exist(self): |
| 26 host = MockHost() |
| 27 host.executive = MockExecutive2() |
| 28 host.filesystem = MockFileSystem(files={ |
| 29 }) |
| 30 exporter = TestExporter(host, options={}) |
| 31 exporter.pull_down_local_wpt() |
| 32 print host.executive.calls |
| 33 self.assertEqual(len(host.executive.calls), 1) |
| 34 self.assertEqual(host.executive.calls[0][1], 'clone') |
| OLD | NEW |