def test_scan_for_server_reviewboardrc(self): "Test GitClient scan_for_server, .reviewboardrc case""" os.chdir(self.clone_dir) rc = open(os.path.join(self.clone_dir, '.reviewboardrc'), 'w') rc.write('REVIEWBOARD_URL = "%s"' % self.TESTSERVER) rc.close() self.client.user_config = load_config_files(self.clone_dir) ri = self.client.get_repository_info() server = self.client.scan_for_server(ri) self.assertEqual(server, self.TESTSERVER)
def testScanForServerReviewboardrc(self): """Test MercurialClient (+svn) scan_for_server in .reviewboardrc""" rc_filename = os.path.join(self.clone_dir, '.reviewboardrc') rc = open(rc_filename, 'w') rc.write('REVIEWBOARD_URL = "%s"' % self.TESTSERVER) rc.close() self.client.user_config, configs = load_config_files(self.clone_dir) ri = self.client.get_repository_info() server = self.client.scan_for_server(ri) self.assertEqual(self.TESTSERVER, server)