| Index: appengine/cr-buildbucket/test/api_test.py
|
| diff --git a/appengine/cr-buildbucket/test/api_test.py b/appengine/cr-buildbucket/test/api_test.py
|
| index e751bcb2a2e2df601666a02e0e43ddf5911e9500..4679456313dec368c16b45e450183e85f0c74415 100644
|
| --- a/appengine/cr-buildbucket/test/api_test.py
|
| +++ b/appengine/cr-buildbucket/test/api_test.py
|
| @@ -620,6 +620,18 @@ class ApiTests(object):
|
| service.get.side_effect = auth.AuthorizationError
|
| self.call_api('get', {'id': 123}, status=403)
|
|
|
| + ############################# LONGEST_PENDING_TIME ###########################
|
| +
|
| + def test_longest_pending_time(self):
|
| + service.longest_pending_time.return_value = datetime.timedelta(seconds=42)
|
| + req = {
|
| + 'bucket': 'chromium',
|
| + 'builder': 'x',
|
| + }
|
| + res = self.call_api('longest_pending_time', req).json_body
|
| + self.assertEqual(res['longest_pending_time_sec'], 42)
|
| + service.longest_pending_time.assert_called_once_with('chromium', 'x')
|
| +
|
|
|
| class EndpointsApiTest(testing.EndpointsTestCase, ApiTests):
|
| api_service_cls = api.BuildBucketApi
|
|
|