From nobody Sat Apr 20 10:43:23 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1555341957; cv=none; d=zoho.com; s=zohoarc; b=bXvCDjihSys7zncWCAfLOLcRu09aPQSXwu3FGyvZT6JDaecReNT4ke3/4nMoO78m/OVWqbTepuszgkPViFbr2pNgt8j2T2s75EkdWmFrLu7HlaVySjCMrnE3Rdot5juvxg9v2tZRcwbzWPXXenbJVze2pkaiW1ZVBEEZr75Jxhw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555341957; 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:ARC-Authentication-Results; bh=QlslQ7gf+tlFPiLs9NrS/YHUfPH/jPtKaYY2PgBjoEk=; b=SDQEQiRmhnLl3E6q7gUqA9JPK36oeIyASNU04HhgptjNFnfGwVSotfr9l3eiGDA/VJORBbw4FNGnvspyut9YAkPibknEHh7OumTdVg1FR5tci14X4AFduqcGVKARW0GfDLEogBM03/L9nauUbwKiKUHvj/FgPHpN117IQHSVjWg= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1555341957339584.6174918858591; Mon, 15 Apr 2019 08:25:57 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 80798C057E3C; Mon, 15 Apr 2019 15:25:51 +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 19E321001E6D; Mon, 15 Apr 2019 15:25:44 +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 ED6423FAF4; Mon, 15 Apr 2019 15:25:33 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x3FFPVZJ026637 for ; Mon, 15 Apr 2019 11:25:31 -0400 Received: by smtp.corp.redhat.com (Postfix) id 3C3D05D9CA; Mon, 15 Apr 2019 15:25:31 +0000 (UTC) Received: from antique-work.brq.redhat.com (unknown [10.43.2.63]) by smtp.corp.redhat.com (Postfix) with ESMTP id BA33E5D9C9 for ; Mon, 15 Apr 2019 15:25:26 +0000 (UTC) From: Pavel Hrdina To: libvir-list@redhat.com Date: Mon, 15 Apr 2019 17:25:25 +0200 Message-Id: <000e06450dcc4f692d76233ae941dc10ce1fe730.1555341905.git.phrdina@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [dbus PATCH] tests: fix test_connect X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Mon, 15 Apr 2019 15:25:55 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Calling fixtures directly was removed in pytest 4.0, we can change the fixture to be a wrapper around the original function and use the original fixture name. Signed-off-by: Pavel Hrdina Reviewed-by: J=C3=A1n Tomko --- tests/libvirttest.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/tests/libvirttest.py b/tests/libvirttest.py index 14baf5b..a442196 100644 --- a/tests/libvirttest.py +++ b/tests/libvirttest.py @@ -84,13 +84,7 @@ class BaseTestClass(): interface_obj.Create(0) return path, interface_obj =20 - @pytest.fixture def node_device_create(self): - """ Fixture to create dummy node device on the test driver - - This fixture should be used in the setup of every test manipulating - with node devices. - """ # We need a usable parent nodedev: possible candidates are # scsi_host2 (available since libvirt 3.1.0) and # test-scsi-host-vport (available until libvirt 3.0.0). @@ -109,6 +103,15 @@ class BaseTestClass(): path =3D self.connect.NodeDeviceCreateXML(xml, 0) return path =20 + @pytest.fixture(name=3D"node_device_create") + def fixture_node_device_create(self): + """ Fixture to create dummy node device on the test driver + + This fixture should be used in the setup of every test manipulating + with node devices. + """ + return self.node_device_create() + @pytest.fixture def storage_volume_create(self): """ Fixture to create dummy storage volume on the test driver --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list