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

Side by Side Diff: dashboard/dashboard/pinpoint/handlers/jobs_test.py

Issue 2956343003: [pinpoint] Post bug comments when a job starts and completes. (Closed)
Patch Set: Created 3 years, 5 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 2017 The Chromium Authors. All rights reserved. 1 # Copyright 2017 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 json 5 import json
6 import unittest 6 import unittest
7 7
8 import webapp2 8 import webapp2
9 import webtest 9 import webtest
10 10
(...skipping 22 matching lines...) Expand all
33 def tearDown(self): 33 def tearDown(self):
34 self.testbed.deactivate() 34 self.testbed.deactivate()
35 35
36 def testPost_ValidRequest(self): 36 def testPost_ValidRequest(self):
37 # Create job. 37 # Create job.
38 job = job_module.Job.New( 38 job = job_module.Job.New(
39 configuration='Mac', 39 configuration='Mac',
40 test_suite='suite', 40 test_suite='suite',
41 test='filter', 41 test='filter',
42 metric='metric', 42 metric='metric',
43 auto_explore=True) 43 auto_explore=True,
44 bug_id=None)
44 job.put() 45 job.put()
45 46
46 data = json.loads(self.testapp.post('/jobs').body) 47 data = json.loads(self.testapp.post('/jobs').body)
47 48
48 self.assertEqual(1, data['jobs_count']) 49 self.assertEqual(1, data['jobs_count'])
49 self.assertEqual(1, len(data['jobs_list'])) 50 self.assertEqual(1, len(data['jobs_list']))
50 self.assertEqual(job.AsDict(), data['jobs_list'][0]) 51 self.assertEqual(job.AsDict(), data['jobs_list'][0])
OLDNEW
« no previous file with comments | « no previous file | dashboard/dashboard/pinpoint/handlers/new.py » ('j') | dashboard/dashboard/pinpoint/models/job.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698