From 0dabf7bbaadeb2c0b069c1a2f5c0949a76207c00 Mon Sep 17 00:00:00 2001 From: ag613915cao Date: Mon, 29 Apr 2019 15:17:10 +0700 Subject: [PATCH] Replace yield_fixture() Because yield_fixture() is deprecated since pytest 3.0 [1]. It is not recommend to use the decorator instead of fixture(). [1] https://docs.pytest.org/en/latest/yieldfixture.html --- tests/conftest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index 06929a419..c73c2f099 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -69,14 +69,14 @@ user = "user" key_path = os.path.join(here, "{0}.key".format(user)) -@pytest.yield_fixture() +@pytest.fixture def ssh_server(): users = {user: key_path} with mockssh.Server(users) as s: yield s -@pytest.yield_fixture() +@pytest.fixture def ssh(ssh_server): yield SSHConnection( ssh_server.host,