Exemplo n.º 1
0
    def Post(self):
        owner = self.request.get('owner')
        cc = self.request.get('cc')
        summary = self.request.get('summary')
        description = self.request.get('description')
        labels = self.request.get_all('label')
        components = self.request.get_all('component')
        keys = self.request.get_all('key')
        bisect = api_utils.ParseBool(self.request.get('bisect', 'true'))
        http = utils.ServiceAccountHttp()

        return file_bug.FileBug(http, owner, cc, summary, description, labels,
                                components, keys, bisect)
Exemplo n.º 2
0
 def testSupportsCCList(self):
     http = utils.ServiceAccountHttp()
     owner = ''
     cc = '[email protected],[email protected],[email protected],,'
     summary = 'test'
     description = 'Test test.'
     labels = []
     components = []
     test_path = 'ChromiumPerf/linux/scrolling/first_paint'
     test_key = utils.TestKey(test_path)
     subscription = Subscription(name='Sheriff', )
     keys = [self._AddAnomaly(10, 20, test_key, subscription).urlsafe()]
     bisect = False
     result = file_bug.FileBug(http, owner, cc, summary, description,
                               labels, components, keys, bisect)
     self.assertNotIn('bisect_error', result)
     self.assertNotIn('jobId', result)
Exemplo n.º 3
0
 def testBisectDisabled(self):
     http = utils.ServiceAccountHttp()
     owner = ''
     cc = '*****@*****.**'
     summary = 'test'
     description = 'Test test.'
     labels = []
     components = []
     test_path = 'ChromiumPerf/linux/scrolling/first_paint'
     test_key = utils.TestKey(test_path)
     sheriff_key = sheriff.Sheriff(id='Sheriff', labels=[]).put()
     keys = [self._AddAnomaly(10, 20, test_key, sheriff_key).urlsafe()]
     bisect = False
     result = file_bug.FileBug(http, owner, cc, summary, description,
                               labels, components, keys, bisect)
     self.assertNotIn('bisect_error', result)
     self.assertNotIn('jobId', result)
Exemplo n.º 4
0
    def Post(self):
        owner = self.request.get('owner')
        cc = self.request.get('cc')
        summary = self.request.get('summary')
        description = self.request.get('description')
        labels = self.request.get_all('label')
        components = self.request.get_all('component')
        keys = self.request.get_all('key')

        # TODO(924228): After v2spa launches, change its client id to something
        # that is whitelisted by the issue tracker service (or have its client id
        # whitelisted), then forward the bearer token from
        # self.request.headers.get('Authorization') to the issue tracker service by
        # overriding httplib2.Http().request.
        http = utils.ServiceAccountHttp()

        return file_bug.FileBug(http, owner, cc, summary, description, labels,
                                components, keys)