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

Unified Diff: dashboard/dashboard/pinpoint/handlers/new_test.py

Issue 3010873003: [pinpoint] Limit executions to one test run each + device sharding. (Closed)
Patch Set: Ready! Created 3 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 side-by-side diff with in-line comments
Download patch
Index: dashboard/dashboard/pinpoint/handlers/new_test.py
diff --git a/dashboard/dashboard/pinpoint/handlers/new_test.py b/dashboard/dashboard/pinpoint/handlers/new_test.py
index fd1d73d98796bdae383074ab5e75fe91cbfde533..62536cd362165a03ef90ebf985899a8a57aca238 100644
--- a/dashboard/dashboard/pinpoint/handlers/new_test.py
+++ b/dashboard/dashboard/pinpoint/handlers/new_test.py
@@ -95,6 +95,13 @@ class NewTest(testing_common.TestCase):
response = self.testapp.post('/api/new', _BASE_REQUEST, status=200)
self.assertEqual({'error': 'message'}, json.loads(response.body))
+ @mock.patch.object(api_auth, '_AuthorizeOauthUser', mock.MagicMock())
+ def testPost_InvalidRepeatCount(self):
+ request = dict(_BASE_REQUEST)
+ request['repeat_count'] = 'not_an_int'
+ response = self.testapp.post('/api/new', request, status=200)
+ self.assertIn('error', json.loads(response.body))
+
@mock.patch.object(api_auth, '_AuthorizeOauthUser', mock.MagicMock())
def testPost_InvalidBug(self):
request = dict(_BASE_REQUEST)

Powered by Google App Engine
This is Rietveld 408576698