def _AddFakeRietveldConfig(self): """Sets up fake service account credentials for tests.""" rietveld_service.RietveldConfig( id='default_rietveld_config', client_email='*****@*****.**', service_account_key='Fake Account Key', server_url='https://test-rietveld.appspot.com', internal_server_url='https://test-rietveld.appspot.com').put()
def _AddRietveldConfig(self): """Adds a RietveldConfig entity to the datastore. This is used in order to get the Rietveld URL when requests are made to the handler in te tests below. In the real datastore, the RietveldConfig entity would contain credentials. """ rietveld_service.RietveldConfig( id='default_rietveld_config', client_email='*****@*****.**', service_account_key='Fake Account Key', server_url='https://test-rietveld.appspot.com', internal_server_url='https://test-rietveld.appspot.com').put()
def setUp(self): super(StartBisectTest, self).setUp() app = webapp2.WSGIApplication( [('/start_try_job', start_try_job.StartBisectHandler)]) self.testapp = webtest.TestApp(app) namespaced_stored_object.Set( can_bisect.BISECT_BOT_MAP_KEY, { 'ChromiumPerf': [ ('nexus4', 'android_nexus4_perf_bisect'), ('nexus7', 'android_nexus7_perf_bisect'), ('win8', 'win_8_perf_bisect'), ('xp', 'win_xp_perf_bisect'), ('android', 'android_nexus7_perf_bisect'), ('mac', 'mac_perf_bisect'), ('win', 'win_perf_bisect'), ('linux', 'linux_perf_bisect'), ('', 'linux_perf_bisect'), ], }) namespaced_stored_object.Set( start_try_job._BUILDER_TYPES_KEY, {'ChromiumPerf': 'perf', 'OtherMaster': 'foo'}) namespaced_stored_object.Set( start_try_job._BOT_BROWSER_MAP_KEY, [ ['android', 'android-chromium'], ['winx64', 'release_x64'], ['win_x64', 'release_x64'], ['', 'release'], ]) namespaced_stored_object.Set( start_try_job._MASTER_BUILDBUCKET_MAP_KEY, { 'ChromiumPerf': 'master.tryserver.chromium.perf' }) testing_common.SetSheriffDomains(['chromium.org']) # Add fake Rietveld auth info. rietveld_config = rietveld_service.RietveldConfig( id='default_rietveld_config', client_email='*****@*****.**', service_account_key='Fake Account Key', server_url='https://test-rietveld.appspot.com') rietveld_config.put()