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

Side by Side Diff: appengine/test_results/test/testfilehandler_test.py

Issue 499103002: Make test_results deployable again. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: merge to ToT Created 6 years, 3 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 unified diff | Download patch
« no previous file with comments | « appengine/test_results/test/testfile_test.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 collections 5 import collections
6 import json 6 import json
7 import os
7 8
8 from appengine.utils import testing 9 from appengine.utils import testing
9 from appengine.test_results import main 10
10 from appengine.test_results.handlers import master_config 11 from appengine.path_mangler_hack import PathMangler
11 from appengine.test_results.handlers import testfilehandler 12 with PathMangler(os.path.dirname(os.path.dirname(__file__))):
12 from appengine.test_results.model.jsonresults import ( 13 from appengine.test_results import main
13 JSON_RESULTS_HIERARCHICAL_VERSION 14 from appengine.test_results.handlers import master_config
14 ) 15 from appengine.test_results.handlers import testfilehandler
16 from appengine.test_results.model.jsonresults import (
17 JSON_RESULTS_HIERARCHICAL_VERSION
18 )
15 19
16 20
17 class TestFileHandlerTest(testing.AppengineTestCase): 21 class TestFileHandlerTest(testing.AppengineTestCase):
18 22
19 app_module = main.app 23 app_module = main.app
20 24
21 def test_basic_upload(self): 25 def test_basic_upload(self):
22 master = master_config.getMaster('chromium.chromiumos') 26 master = master_config.getMaster('chromium.chromiumos')
23 builder = 'test-builder' 27 builder = 'test-builder'
24 test_type = 'test-type' 28 test_type = 'test-type'
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 (testfilehandler.PARAM_BUILDER, builder), 153 (testfilehandler.PARAM_BUILDER, builder),
150 (testfilehandler.PARAM_MASTER, master['url_name']), 154 (testfilehandler.PARAM_MASTER, master['url_name']),
151 (testfilehandler.PARAM_TEST_TYPE, test_type), 155 (testfilehandler.PARAM_TEST_TYPE, test_type),
152 (testfilehandler.PARAM_BUILD_NUMBER, '123'), 156 (testfilehandler.PARAM_BUILD_NUMBER, '123'),
153 (testfilehandler.PARAM_NAME, 'full_results.json') 157 (testfilehandler.PARAM_NAME, 'full_results.json')
154 ]) 158 ])
155 response = self.test_app.get('/testfile', params=params) 159 response = self.test_app.get('/testfile', params=params)
156 self.assertEqual(response.status_int, 200) 160 self.assertEqual(response.status_int, 200)
157 response_json = json.loads(response.normal_body) 161 response_json = json.loads(response.normal_body)
158 self.assertEqual(response_json['chromium_revision'], '67890') 162 self.assertEqual(response_json['chromium_revision'], '67890')
OLDNEW
« no previous file with comments | « appengine/test_results/test/testfile_test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698