Exemplo n.º 1
0
 def test_fetch_full_results_web_tests(self):
     buildbot = BuildBot()
     buildbot.web = MockWeb(
         urls={
             'https://test-results.appspot.com/testfile?buildnumber=123&'
             'callback=ADD_RESULTS&builder=builder&name=full_results.json':
             'ADD_RESULTS(%s);' %
             (json.dumps([{
                 "TestType":
                 "webkit_layout_tests on Intel GPU (with patch)"
             }, {
                 "TestType": "base_unittests (with patch)"
             }])),
             'https://test-results.appspot.com/data/layout_results/builder/123/'
             'webkit_layout_tests%20on%20Intel%20GPU%20%28with%20patch%29/'
             'layout-test-results/failing_results.json':
             json.dumps({'passed': True}),
         })
     results = buildbot.fetch_full_results(Build('builder', 123), master='')
     self.assertEqual(
         results._results,
         {  # pylint: disable=protected-access
             'passed': True
         })
     self.assertLog([])
Exemplo n.º 2
0
 def test_fetch_full_results_webdriver(self):
     buildbot = BuildBot()
     buildbot.web = MockWeb(
         urls={
             'https://test-results.appspot.com/testfile?buildnumber=321&'
             'master=tryserver.chromium.linux&builder=foo&'
             'testtype=webdriver_tests_suite+%28with+patch%29&'
             'name=full_results.json':
             json.dumps({'passed': True}),
         })
     results = buildbot.fetch_full_results(
         Build('foo', 321), master='tryserver.chromium.linux')
     self.assertEqual(
         results._results,
         {  # pylint: disable=protected-access
             'passed': True
         })
     self.assertLog([])