Skip to content

Commit

Permalink
cloud-init: minor test cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
dbungert committed Oct 4, 2024
1 parent a348c8b commit 9781b44
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions subiquity/tests/test_cloudinit.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,12 @@ class TestCloudInitVersion(SubiTestCase):
)
def test_split_version(self, pkgver, expected):
with patch("subiquity.cloudinit.run_command") as rc:
rc.return_value = Mock()
rc.return_value.stdout = pkgver
rc.return_value = Mock(stdout=pkgver)
self.assertEqual(expected, cloud_init_version())

def test_cloud_init_not_present(self):
with patch("subiquity.cloudinit.run_command") as rc:
rc.return_value = Mock()
rc.return_value.stdout = ""
rc.return_value = Mock(stdout="")
self.assertEqual("", cloud_init_version())

def test_cloud_init_full(self):
Expand Down

0 comments on commit 9781b44

Please sign in to comment.