Skip to content

Commit

Permalink
test: mock internet access in test_upgrade (#5212)
Browse files Browse the repository at this point in the history
Fixes: #5211
  • Loading branch information
aciba90 committed Apr 26, 2024
1 parent 725f5fb commit aeafb83
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/unittests/test_upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,12 @@ def previous_obj_pkl(self, request):
"match_case_insensitive_module_name",
lambda name: f"DataSource{name}",
)
@mock.patch(
"cloudinit.sources.DataSourceCloudStack.get_vr_address",
return_value="data-server.",
)
def test_all_ds_init_vs_unpickle_attributes(
self, mode, mocker, paths, tmpdir
self, m_get_vr_address, mode, mocker, paths, tmpdir
):
"""Unpickle resets any instance attributes created in __init__
Expand Down

0 comments on commit aeafb83

Please sign in to comment.