summaryrefslogtreecommitdiff
path: root/tests/unittests/sources
diff options
context:
space:
mode:
authorJames Falcon <james.falcon@canonical.com>2022-01-10 16:56:29 -0600
committerGitHub <noreply@github.com>2022-01-10 15:56:29 -0700
commitdc1aabfca851e520693c05322f724bd102c76364 (patch)
tree05c7a0d293b9ddece5671fcdf6a38c59ce776ac8 /tests/unittests/sources
parent57ccd89b6af7d3551915df56f548b7617dfcebf9 (diff)
downloadvyos-cloud-init-dc1aabfca851e520693c05322f724bd102c76364.tar.gz
vyos-cloud-init-dc1aabfca851e520693c05322f724bd102c76364.zip
Remove 3.5 and xenial support (SC-711) (#1167)
Includes: - Update tox.ini and .travis.yml accordingly - Cleanup tox.ini with new tox syntax and cloud-init dependencies - Update documentation accordingly - Replace/remove xenial references where additional testing isn't required - Remove xenial checks in integration tests - Replace yield_fixture with fixture in pytest tests Sections of code commented with lines like "Remove when Xenial is no longer supported" still exist as they're require additional testing.
Diffstat (limited to 'tests/unittests/sources')
-rw-r--r--tests/unittests/sources/test_lxd.py2
-rw-r--r--tests/unittests/sources/test_oracle.py4
-rw-r--r--tests/unittests/sources/test_vmware.py2
3 files changed, 4 insertions, 4 deletions
diff --git a/tests/unittests/sources/test_lxd.py b/tests/unittests/sources/test_lxd.py
index ad1508a0..e11c3746 100644
--- a/tests/unittests/sources/test_lxd.py
+++ b/tests/unittests/sources/test_lxd.py
@@ -57,7 +57,7 @@ def lxd_metadata():
return LXD_V1_METADATA
-@pytest.yield_fixture
+@pytest.fixture
def lxd_ds(request, paths, lxd_metadata):
"""
Return an instantiated DataSourceLXD.
diff --git a/tests/unittests/sources/test_oracle.py b/tests/unittests/sources/test_oracle.py
index e0e79c8c..356b3738 100644
--- a/tests/unittests/sources/test_oracle.py
+++ b/tests/unittests/sources/test_oracle.py
@@ -93,7 +93,7 @@ def metadata_version():
return 2
-@pytest.yield_fixture
+@pytest.fixture
def oracle_ds(request, fixture_utils, paths, metadata_version):
"""
Return an instantiated DataSourceOracle.
@@ -649,7 +649,7 @@ class TestCommon_GetDataBehaviour:
separate class for that case.)
"""
- @pytest.yield_fixture(params=[True, False])
+ @pytest.fixture(params=[True, False])
def parameterized_oracle_ds(self, request, oracle_ds):
"""oracle_ds parameterized for iSCSI and non-iSCSI root respectively"""
is_iscsi_root = request.param
diff --git a/tests/unittests/sources/test_vmware.py b/tests/unittests/sources/test_vmware.py
index dcdbda89..dd331349 100644
--- a/tests/unittests/sources/test_vmware.py
+++ b/tests/unittests/sources/test_vmware.py
@@ -57,7 +57,7 @@ runcmd:
"""
-@pytest.yield_fixture(autouse=True)
+@pytest.fixture(autouse=True)
def common_patches():
with mock.patch("cloudinit.util.platform.platform", return_value="Linux"):
with mock.patch.multiple(