From nobody Fri Apr 19 04:22:33 2024 Delivered-To: importer2@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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 170.10.133.124 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=bytedance.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1644926305568247.9358067826363; Tue, 15 Feb 2022 03:58:25 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-118-7R4jNXFEPFSA0WZ2_HGlBQ-1; Tue, 15 Feb 2022 06:58:21 -0500 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D548B344B0; Tue, 15 Feb 2022 11:58:20 +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 CBFAB6E194; Tue, 15 Feb 2022 11:58:20 +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 C3FFA4BB7C; Tue, 15 Feb 2022 11:58:20 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 21FBwIEu019354 for ; Tue, 15 Feb 2022 06:58:19 -0500 Received: by smtp.corp.redhat.com (Postfix) id DFB13C50954; Tue, 15 Feb 2022 11:58:18 +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 DB907C5094F for ; Tue, 15 Feb 2022 11:58:18 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C1AFB18E5380 for ; Tue, 15 Feb 2022 11:58:18 +0000 (UTC) Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-192-h5kLqsNDNkeEzAOiJ3VaBA-1; Tue, 15 Feb 2022 06:57:59 -0500 Received: by mail-wr1-f50.google.com with SMTP id h6so31673341wrb.9 for ; Tue, 15 Feb 2022 03:57:59 -0800 (PST) Received: from localhost ([46.69.19.210]) by smtp.gmail.com with ESMTPSA id i2sm19180967wmq.45.2022.02.15.03.57.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 03:57:58 -0800 (PST) X-MC-Unique: 7R4jNXFEPFSA0WZ2_HGlBQ-1 X-MC-Unique: h5kLqsNDNkeEzAOiJ3VaBA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=F2eqYkbPyWv0BLVVz6Fy0Rrc6ekQdNEsj2yiAl3JwSk=; b=uV7War0vTc5E+BhtmfSdT5QPN4mqw+qlrJIddujg0Pb2buMReKkr0sXbtN3udFZGZR kpvdPfVdjGB7Pl1p8OHgKiCBfPbuNxIGBUBiXYJdFvZDZ7IopjY/PmiJIAYaRCif1Kd1 IBiDfif5Als7W5VQtRw6hKfaUIsO+Dz0wS82gZR4a7jGrmdTj9VuhnUnHDbmKKk94xy6 X99l6FxMhN7sOb3ZWEin6RnJb0uBrjlIM6yIi70V1VXVw5O1XDSiLrJRKLgR0hdhkErI fmpW6m2EzBlc0T9bKRd2Gon8dou/Ym0gK4c20otB033z3oHfWKz+IuOatwt6+e3czqp3 Jw1w== X-Gm-Message-State: AOAM530XTxKeHR2QvEKK2diNqEgiGTYUCzx8ma272wnFM+uZEbPwYbgW edm/ftPtqj33VUS8ZMq9R90ez00GjeE5dQ== X-Google-Smtp-Source: ABdhPJwePq/abF4fvDITeOnRD11LdODGiaxDp91b+wuNUPG2U7WIXYZNbAtMtUI+38JWPqyj3icjUw== X-Received: by 2002:a05:6000:2cc:: with SMTP id o12mr3096068wry.371.1644926278383; Tue, 15 Feb 2022 03:57:58 -0800 (PST) From: Fam Zheng To: patchew-devel@redhat.com Date: Tue, 15 Feb 2022 11:57:55 +0000 Message-Id: <20220215115756.3013086-2-fam.zheng@bytedance.com> In-Reply-To: <20220215115756.3013086-1-fam.zheng@bytedance.com> References: <20220215115756.3013086-1-fam.zheng@bytedance.com> MIME-Version: 1.0 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.85 on 10.11.54.8 X-loop: patchew-devel@redhat.com Cc: Fam Zheng Subject: [Patchew-devel] [PATCH 1/2] tests: Don't assume result order in rest test 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.13 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-ZM-MESSAGEID: 1644926308043100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Fam Zheng --- tests/test_rest.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tests/test_rest.py b/tests/test_rest.py index cceda69..ccaeca4 100755 --- a/tests/test_rest.py +++ b/tests/test_rest.py @@ -411,18 +411,18 @@ class RestTest(PatchewTestCase): =20 resp =3D self.api_client.get(self.REST_BASE + "series/?q=3Dproject= :QEMU") self.assertEqual(resp.data["count"], 2) - self.assertEqual( - resp.data["results"][0]["resource_uri"], resp1.data["resource_= uri"] - ) - self.assertEqual(resp.data["results"][0]["subject"], resp1.data["s= ubject"]) - self.assertEqual("replies" in resp.data["results"][0], False) - self.assertEqual("patches" in resp.data["results"][0], False) - self.assertEqual( - resp.data["results"][1]["resource_uri"], resp2.data["resource_= uri"] - ) - self.assertEqual(resp.data["results"][1]["subject"], resp2.data["s= ubject"]) - self.assertEqual("replies" in resp.data["results"][1], False) - self.assertEqual("patches" in resp.data["results"][1], False) + + def cmp_result(a, expected): + self.assertEqual(a["resource_uri"], expected["resource_uri"]) + self.assertEqual(a["subject"], expected["subject"]) + self.assertNotIn("replies", a) + self.assertNotIn("patches", a) + if resp.data["results"][0]["subject"] =3D=3D resp1.data["subject"]: + cmp_result(resp.data['results'][0], resp1.data) + cmp_result(resp.data['results'][1], resp2.data) + else: + cmp_result(resp.data['results'][0], resp2.data) + cmp_result(resp.data['results'][1], resp1.data) =20 resp =3D self.api_client.get(self.REST_BASE + "projects/12345/seri= es/?q=3Dquorum") self.assertEqual(resp.status_code, 404) --=20 2.25.1 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://listman.redhat.com/mailman/listinfo/patchew-devel From nobody Fri Apr 19 04:22:33 2024 Delivered-To: importer2@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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 170.10.129.124 as permitted sender) smtp.mailfrom=patchew-devel-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=bytedance.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1644926293072903.9338948554546; Tue, 15 Feb 2022 03:58:13 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-663-Qtpum547MFiXGa2tQ_FU4w-1; Tue, 15 Feb 2022 06:58:07 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BA4AF835B47; Tue, 15 Feb 2022 11:58:06 +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 B26227B9D4; Tue, 15 Feb 2022 11:58:06 +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 A8B791809C88; Tue, 15 Feb 2022 11:58:06 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 21FBw2TU019316 for ; Tue, 15 Feb 2022 06:58:03 -0500 Received: by smtp.corp.redhat.com (Postfix) id 9EE4C400F3F3; Tue, 15 Feb 2022 11:58:02 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast07.extmail.prod.ext.rdu2.redhat.com [10.11.55.23]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9AA51400F3EC for ; Tue, 15 Feb 2022 11:58:02 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 471BD3C11C71 for ; Tue, 15 Feb 2022 11:58:02 +0000 (UTC) Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-510-wBCgd6wdOD-4tGUlYH5oXw-1; Tue, 15 Feb 2022 06:58:00 -0500 Received: by mail-wm1-f46.google.com with SMTP id x3-20020a05600c21c300b0037c01ad715bso1248580wmj.2 for ; Tue, 15 Feb 2022 03:58:00 -0800 (PST) Received: from localhost ([46.69.19.210]) by smtp.gmail.com with ESMTPSA id n11sm16013824wms.13.2022.02.15.03.57.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 03:57:58 -0800 (PST) X-MC-Unique: Qtpum547MFiXGa2tQ_FU4w-1 X-MC-Unique: wBCgd6wdOD-4tGUlYH5oXw-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xSsE2NHRz4iGCX6YiBhUQVjQHvjZGfS9uTKczE/D10E=; b=syekhiAG5+JwjI9XfEyUOBVAUlb5m1zF0VHcSlS9/w45cwdqk7JowAxRb7Un8qvwyv bh75E1mhnrsnCacES8QLW1lj4Q6wqEWw8DinibpaHU9fVSaVPRuTiYTKf4bsRMLCQjKQ kVqBOy9fx1WBy2bZRXA07Wj8lHkoO+wo6PDTnyBvnX7mIHbMZzJ1PvpFh+EzHdDrXCmh ZOG/GgSN84KPLqSQvZgBpS30Swqk5HXcMBtORMbFZQB9tqqAsuyuk2e9MA/ee1LUpMwS uQoR4HHt8QOWwePLupfckK4X6QJP3Z7B023n+DySYYXOMDQ6KSHJYeBCsmaTC35SbK0S dgqw== X-Gm-Message-State: AOAM533mP+BIcNhEyGj+mNrqPgXCUnSUmTK4wFKzKy4WDLGAS3a/U9fI dPYztvbRg/J2h2PkkZiRcTB0CDlSOBAUZQ== X-Google-Smtp-Source: ABdhPJx91jbwcvf2fuLvs8ss4CRG1kxtQiESuXInLT5XETgilFgwMptv/rvObV4InTo/1yHRCy6NHw== X-Received: by 2002:a05:600c:2b88:b0:34d:e6bb:8143 with SMTP id j8-20020a05600c2b8800b0034de6bb8143mr2743043wmc.93.1644926279103; Tue, 15 Feb 2022 03:57:59 -0800 (PST) From: Fam Zheng To: patchew-devel@redhat.com Date: Tue, 15 Feb 2022 11:57:56 +0000 Message-Id: <20220215115756.3013086-3-fam.zheng@bytedance.com> In-Reply-To: <20220215115756.3013086-1-fam.zheng@bytedance.com> References: <20220215115756.3013086-1-fam.zheng@bytedance.com> MIME-Version: 1.0 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.84 on 10.11.54.2 X-loop: patchew-devel@redhat.com Cc: Fam Zheng Subject: [Patchew-devel] [PATCH 2/2] ci: Add github action 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.12 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-ZM-MESSAGEID: 1644926294013100001 Content-Type: text/plain; charset="utf-8" From: Fam Zheng Signed-off-by: Fam Zheng --- .github/workflows/django.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/django.yml diff --git a/.github/workflows/django.yml b/.github/workflows/django.yml new file mode 100644 index 0000000..6aa97f7 --- /dev/null +++ b/.github/workflows/django.yml @@ -0,0 +1,32 @@ +name: Django CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + max-parallel: 4 + matrix: + python-version: [3.7, 3.8, 3.9] + + steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Install Dependencies + run: | + python -m pip install --upgrade pip + - name: Run Tests + run: | + python3 -m venv ./venv + . venv/bin/activate + pip install -r requirements.txt + python manage.py test --=20 2.25.1 _______________________________________________ Patchew-devel mailing list Patchew-devel@redhat.com https://listman.redhat.com/mailman/listinfo/patchew-devel