def test_pr_links_user(self): "Individual PR pages grab digest information" gcs_async_test.install_handler(self.testbed.get_stub('urlfetch'), {'12345/': []}) make_pr(12345, ['human'], {'title': 'huge pr!'}) resp = app.get('/pr/12345') self.assertIn('href="/pr/human"', resp) self.assertIn('huge pr!', resp)
def init_pr_directory(self): gcs_async_test.install_handler(self.testbed.get_stub('urlfetch'), {'123/': ['build', 'e2e'], '123/build/': ['11', '10', '12'], # out of order '123/e2e/': ['47', '46']}) for job, builds in self.BUILDS.iteritems(): for build, started, finished in builds: path = '/kubernetes-jenkins/pr-logs/pull/123/%s/%s/' % (job, build) if started: write(path + 'started.json', started) if finished: write(path + 'finished.json', finished)
def test_pr_handler_missing(self): gcs_async_test.install_handler(self.testbed.get_stub('urlfetch'), {'124/': []}) response = app.get('/pr/124') self.assertIn('No Results', response)