From nobody Mon Sep 16 19:39:40 2024 Delivered-To: importer2@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=patchew-devel-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1601048891; cv=none; d=zohomail.com; s=zohoarc; b=TVN0M5QpAxkRiXYZzznU4uDrNPelM7kL35fqLGwLFDWzvX1FZMgA5/+kiYeImPoQlQIRe2MbAUdwXoSeoUrrfZR0Xp0kWtjsj/s3m5sOSbgrHClt7D1i623pS32qDikcxlodGwcH0TuggBorhct2Yrb3RQCoigS+ZXNiX4WwFrI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1601048891; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=6NT5HaXWyTV6bf6Q7wJfPDlmBrvfSjqlPM87xbDhJrg=; b=gttKkX9XyBxU4lOnrCRdQ9x2vK9c8Q+H2lT57f+ugtod/j9DEE6d5E53njvi+WDAHonrLzouKvyA5RWNZYnVJ09fztgb4zDcVwFuPbKiExmuMy3I3wQ3XCzvzSMTqXyDLHW3joNdbdt7OpRIonOtbkpBkiWEzfIeueK3rixUqbg= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1601048891409468.9859701805085; Fri, 25 Sep 2020 08:48:11 -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-528-o5kgIyM4OI2tEvmY--9-LA-1; Fri, 25 Sep 2020 11:48:06 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C00B2802EA3; Fri, 25 Sep 2020 15:48:05 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B6E2A19C78; Fri, 25 Sep 2020 15:48:05 +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 AAF3C1826D2C; Fri, 25 Sep 2020 15:48:05 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 08PFjPU7024542 for ; Fri, 25 Sep 2020 11:45:25 -0400 Received: by smtp.corp.redhat.com (Postfix) id A8EC22157F26; Fri, 25 Sep 2020 15:45:25 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast06.extmail.prod.ext.rdu2.redhat.com [10.11.55.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A380C2166B27 for ; Fri, 25 Sep 2020 15:45:25 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8E5A2185A78B for ; Fri, 25 Sep 2020 15:45:25 +0000 (UTC) Received: from sender2-op-o12.zoho.com.cn (sender2-op-o12.zoho.com.cn [163.53.93.243]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-38-QWPxJmIgMryhmVgJS_0Jzw-1; Fri, 25 Sep 2020 11:45:17 -0400 Received: from localhost (host109-159-73-6.range109-159.btcentralplus.com [109.159.73.6]) by mx.zoho.com.cn with SMTPS id 160104870479559.76423607157062; Fri, 25 Sep 2020 23:45:04 +0800 (CST) X-MC-Unique: o5kgIyM4OI2tEvmY--9-LA-1 X-MC-Unique: QWPxJmIgMryhmVgJS_0Jzw-1 From: fam@euphon.net To: patchew-devel@redhat.com Message-ID: <20200925154243.685513-9-fam@euphon.net> Date: Fri, 25 Sep 2020 16:42:40 +0100 In-Reply-To: <20200925154243.685513-1-fam@euphon.net> References: <20200925154243.685513-1-fam@euphon.net> MIME-Version: 1.0 X-ZohoCNMailClient: External X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 08PFjPU7024542 X-loop: patchew-devel@redhat.com Subject: [Patchew-devel] [PATCH 08/11] tests: Assign to N-to-N fields with .set method 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.84 on 10.5.11.23 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 Content-Type: text/plain; charset="utf-8" From: Fam Zheng This is going to be required in newer Django. --- tests/patchewtest.py | 2 +- tests/test_rest.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/patchewtest.py b/tests/patchewtest.py index b8b795a..d0bb568 100644 --- a/tests/patchewtest.py +++ b/tests/patchewtest.py @@ -65,7 +65,7 @@ class PatchewTestCase(dj_test.LiveServerTestCase): username or self.user, self.email, password or self.password ) if groups: - user.groups =3D [Group.objects.get_or_create(name=3Dg)[0] for = g in groups] + user.groups.set([Group.objects.get_or_create(name=3Dg)[0] for = g in groups]) user.save() return user =20 diff --git a/tests/test_rest.py b/tests/test_rest.py index 5baf2ab..e82d8fa 100755 --- a/tests/test_rest.py +++ b/tests/test_rest.py @@ -638,7 +638,7 @@ class RestTest(PatchewTestCase): def test_maintainer_create_message(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 =3D (test,) + self.p.maintainers.set([test]) dp =3D self.get_data_path("0023-multiple-project-patch.mbox.gz") with open(dp, "r") as f: data =3D f.read() --=20 2.25.1 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://www.redhat.com/mailman/listinfo/patchew-devel