From nobody Thu May 16 23:31:25 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=patchew-devel-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1628269188; cv=none; d=zohomail.com; s=zohoarc; b=diEHbEuWZwC8glgOJtiocegx3MFWsuIcmo5yfXfOQ6m49awI1Wq87QBJdlZinIU7bhAbdVDKqCEvX7Hhx+BdsKXcE2Uf8mKJ0AAf2aRJjeFQHZSz5EBZNJT0OuvjXDaBTkee+c8t9n6cfuPmg8RiKredDeRXd0SFzENutWsROSE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1628269188; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=q0bBRofHSOKoPpJlcGhxSgedsYYMPtzZOSVeZwrdvyU=; b=PhmdUjZLh5jswgS5JzYwm5z2JgnOBPBm3x9msxLN/l5bEOsOneJ3DfxVDJONcpRY0KZlVf6Mzzotni3Sax3G9CXd5FPCj+x9ZK0EbajCViaEobgbQ11NKdBGdp11xqSXSRG6Q9IWhFeaP0iKOi66zbGD/e3aOKiVc6gG7nsdHxs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1628269188475330.2768853913657; Fri, 6 Aug 2021 09:59:48 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-289-TE5PYaOdM92TS4Yl3cxEOw-1; Fri, 06 Aug 2021 12:59:46 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 59F0892500; Fri, 6 Aug 2021 16:59:45 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 511D05D6AD; Fri, 6 Aug 2021 16:59:45 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 492504A7C8; Fri, 6 Aug 2021 16:59:45 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 176Gwvct027345 for ; Fri, 6 Aug 2021 12:58:57 -0400 Received: by smtp.corp.redhat.com (Postfix) id 3D8621B4B8; Fri, 6 Aug 2021 16:58:57 +0000 (UTC) Received: from avogadro.lan (unknown [10.39.193.251]) by smtp.corp.redhat.com (Postfix) with ESMTP id ABAF87BE5B for ; Fri, 6 Aug 2021 16:58:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1628269187; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=q0bBRofHSOKoPpJlcGhxSgedsYYMPtzZOSVeZwrdvyU=; b=c4lLdTL+h/7QF54faxGxEx23z4GsG+oC64bUWVxwI9My2fNS2ZT64J9NmDhUfhu3RzFSUe IBeG4zeXs/42T32v5is18j30xPPg/slzRSsA4iT2x+CIOgrWJJE1UE6MeNMO68JLopRyYt MQkaxMWooMFSDkBzTTn1r6IsaSJj6fg= X-MC-Unique: TE5PYaOdM92TS4Yl3cxEOw-1 From: Paolo Bonzini To: patchew-devel@redhat.com Date: Fri, 6 Aug 2021 18:58:40 +0200 Message-Id: <20210806165844.140447-1-pbonzini@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-loop: patchew-devel@redhat.com Subject: [Patchew-devel] [PATCH] tests: check config PUT for non-admin maintainers X-BeenThere: patchew-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Patchew development and discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: patchew-devel-bounces@redhat.com Errors-To: patchew-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=patchew-devel-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1628269190203100002 Content-Type: text/plain; charset="utf-8" Signed-off-by: Paolo Bonzini --- tests/test_rest.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/test_rest.py b/tests/test_rest.py index e82d8fa..cceda69 100755 --- a/tests/test_rest.py +++ b/tests/test_rest.py @@ -128,6 +128,21 @@ class RestTest(PatchewTestCase): self.assertEquals(resp.status_code, 200) self.assertEquals(resp.data["git"]["push_to"], "/tmp/bbb") =20 + def test_project_maintainer_config_put(self): + test =3D self.create_user(username=3D"test", password=3D"userpass") + self.api_client.login(username=3D"test", password=3D"userpass") + self.p.maintainers.set([test]) + + new_config =3D {"git": {"push_to": "/tmp/bbb"}} + resp =3D self.api_client.put( + self.PROJECT_BASE + "config/", new_config, format=3D"json" + ) + self.assertEquals(resp.status_code, 200) + self.assertEquals(resp.data["git"]["push_to"], "/tmp/bbb") + resp =3D self.api_client.get(self.PROJECT_BASE + "config/") + self.assertEquals(resp.status_code, 200) + self.assertEquals(resp.data["git"]["push_to"], "/tmp/bbb") + def test_update_project_head(self): resp =3D self.apply_and_retrieve( "0001-simple-patch.mbox.gz", --=20 2.31.1 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://listman.redhat.com/mailman/listinfo/patchew-devel