| OLD | NEW |
| 1 # Copyright (C) 2009 Google Inc. All rights reserved. | 1 # Copyright (C) 2009 Google Inc. All rights reserved. |
| 2 # | 2 # |
| 3 # Redistribution and use in source and binary forms, with or without | 3 # Redistribution and use in source and binary forms, with or without |
| 4 # modification, are permitted provided that the following conditions are | 4 # modification, are permitted provided that the following conditions are |
| 5 # met: | 5 # met: |
| 6 # | 6 # |
| 7 # * Redistributions of source code must retain the above copyright | 7 # * Redistributions of source code must retain the above copyright |
| 8 # notice, this list of conditions and the following disclaimer. | 8 # notice, this list of conditions and the following disclaimer. |
| 9 # * Redistributions in binary form must reproduce the above | 9 # * Redistributions in binary form must reproduce the above |
| 10 # copyright notice, this list of conditions and the following disclaimer | 10 # copyright notice, this list of conditions and the following disclaimer |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | 21 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 22 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 22 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 23 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 23 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 24 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 24 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 25 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 25 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 26 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 26 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 27 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 28 | 28 |
| 29 import unittest | 29 import unittest |
| 30 | 30 |
| 31 from webkitpy.common.net.buildbot import Build |
| 32 from webkitpy.common.net.buildbot import BuildBot |
| 33 from webkitpy.common.net.buildbot import Builder |
| 31 from webkitpy.common.net.layouttestresults import LayoutTestResults | 34 from webkitpy.common.net.layouttestresults import LayoutTestResults |
| 32 from webkitpy.common.net.buildbot import BuildBot, Builder, Build | 35 from webkitpy.layout_tests.models import test_failures |
| 33 from webkitpy.layout_tests.models import test_results | 36 from webkitpy.layout_tests.models import test_results |
| 34 from webkitpy.layout_tests.models import test_failures | |
| 35 from webkitpy.thirdparty.BeautifulSoup import BeautifulSoup | 37 from webkitpy.thirdparty.BeautifulSoup import BeautifulSoup |
| 36 | 38 |
| 37 | 39 |
| 38 class BuilderTest(unittest.TestCase): | 40 class BuilderTest(unittest.TestCase): |
| 39 | 41 |
| 40 def _mock_test_result(self, testname): | 42 def _mock_test_result(self, testname): |
| 41 return test_results.TestResult(testname, [test_failures.FailureTextMisma
tch()]) | 43 return test_results.TestResult(testname, [test_failures.FailureTextMisma
tch()]) |
| 42 | 44 |
| 43 def _install_fetch_build(self, failure): | 45 def _install_fetch_build(self, failure): |
| 44 def _mock_fetch_build(build_number): | 46 def _mock_fetch_build(build_number): |
| (...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 417 b._fetch_revision_to_build_map = self._fetch_revision_to_build_map | 419 b._fetch_revision_to_build_map = self._fetch_revision_to_build_map |
| 418 self.assertEqual("correct build", b.latest_cached_build()) | 420 self.assertEqual("correct build", b.latest_cached_build()) |
| 419 | 421 |
| 420 def results_url(self): | 422 def results_url(self): |
| 421 return "some-url" | 423 return "some-url" |
| 422 | 424 |
| 423 def test_results_zip_url(self): | 425 def test_results_zip_url(self): |
| 424 b = Build(None, 123, 123, False) | 426 b = Build(None, 123, 123, False) |
| 425 b.results_url = self.results_url | 427 b.results_url = self.results_url |
| 426 self.assertEqual("some-url.zip", b.results_zip_url()) | 428 self.assertEqual("some-url.zip", b.results_zip_url()) |
| OLD | NEW |