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

Side by Side Diff: appengine/findit/handlers/crash/test/fracas_result_feedback_test.py

Issue 2663063007: [Predator] Switch from anonymous dict to CrashData. (Closed)
Patch Set: Rebase and fix delta test. Created 3 years, 10 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
OLDNEW
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 calendar 5 import calendar
6 from datetime import datetime 6 from datetime import datetime
7 7
8 from google.appengine.api import users 8 from google.appengine.api import users
9 import webapp2 9 import webapp2
10 10
(...skipping 14 matching lines...) Expand all
25 def setUp(self): 25 def setUp(self):
26 super(FracasResultFeedbackTest, self).setUp() 26 super(FracasResultFeedbackTest, self).setUp()
27 self.mock_current_user(user_email='test@chromium.org', is_admin=True) 27 self.mock_current_user(user_email='test@chromium.org', is_admin=True)
28 28
29 analysis = FracasCrashAnalysis.Create({'signature': 'signature'}) 29 analysis = FracasCrashAnalysis.Create({'signature': 'signature'})
30 analysis.signature = 'signature' 30 analysis.signature = 'signature'
31 analysis.crashed_version = '53.0.2750.0' 31 analysis.crashed_version = '53.0.2750.0'
32 analysis.stack_trace = 'dummy\nframe1\nframe2' 32 analysis.stack_trace = 'dummy\nframe1\nframe2'
33 analysis.platform = 'android' 33 analysis.platform = 'android'
34 analysis.channel = 'canary' 34 analysis.channel = 'canary'
35 analysis.client_id = 'fracas'
36 analysis.status = analysis_status.COMPLETED 35 analysis.status = analysis_status.COMPLETED
37 analysis.historical_metadata = [ 36 analysis.historical_metadata = [
38 {'chrome_version': '53.0.2748.0', 'cpm': 0}, 37 {'chrome_version': '53.0.2748.0', 'cpm': 0},
39 {'chrome_version': '53.0.2749.0', 'cpm': 0}, 38 {'chrome_version': '53.0.2749.0', 'cpm': 0},
40 {'chrome_version': '53.0.2750.0', 'cpm': 0.8} 39 {'chrome_version': '53.0.2750.0', 'cpm': 0.8}
41 ] 40 ]
42 41
43 suspected_cl = { 42 suspected_cl = {
44 'url': 'https://chromium.googlesource.com/chromium/src/+/346a', 43 'url': 'https://chromium.googlesource.com/chromium/src/+/346a',
45 'review_url': 'https://review', 44 'review_url': 'https://review',
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 'result_property': 'regression_range', 115 'result_property': 'regression_range',
117 'user_name': 'test', 116 'user_name': 'test',
118 'triage_status': triage_status.TRIAGED_CORRECT 117 'triage_status': triage_status.TRIAGED_CORRECT
119 }] 118 }]
120 self.analysis.put() 119 self.analysis.put()
121 expected_result = self._GenerateDisplayData() 120 expected_result = self._GenerateDisplayData()
122 response_json = self.test_app.get('/fracas-result-feedback?format=json&' 121 response_json = self.test_app.get('/fracas-result-feedback?format=json&'
123 'key=%s' % self.analysis.key.urlsafe()) 122 'key=%s' % self.analysis.key.urlsafe())
124 self.assertEqual(200, response_json.status_int) 123 self.assertEqual(200, response_json.status_int)
125 self.assertEqual(expected_result, response_json.json_body) 124 self.assertEqual(expected_result, response_json.json_body)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698