diff options
author | Daniel Watkins <oddbloke@ubuntu.com> | 2020-07-10 13:38:27 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-10 11:38:27 -0600 |
commit | b9366677263ff7ec0f5b200900b22ba8871308a3 (patch) | |
tree | 7a8b0641a65bc1e93ef3813cac7ca4c82fb2a7e0 /tests/unittests/test_data.py | |
parent | 3d06abc2e0017436dadbf9c26fefa9f95368db9a (diff) | |
download | vyos-cloud-init-b9366677263ff7ec0f5b200900b22ba8871308a3.tar.gz vyos-cloud-init-b9366677263ff7ec0f5b200900b22ba8871308a3.zip |
test_data: fix faulty patch (#476)
I've been seeing intermittent failures of this test, and I tracked it
down to something to do with`test_features.py`: running this test after
`test_features.py` causes the failure, but the inverse does not.
This fixed patch ensures that the test will pass regardless of ordering.
Diffstat (limited to 'tests/unittests/test_data.py')
-rw-r--r-- | tests/unittests/test_data.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/unittests/test_data.py b/tests/unittests/test_data.py index 7fb9c3ab..fb2b55e8 100644 --- a/tests/unittests/test_data.py +++ b/tests/unittests/test_data.py @@ -648,7 +648,9 @@ class TestConsumeUserDataHttp(TestConsumeUserData, helpers.HttprettyTestCase): util.load_file(ci.paths.get_ipath("cloud_config")) @mock.patch('cloudinit.url_helper.time.sleep') - @mock.patch('cloudinit.features.ERROR_ON_USER_DATA_FAILURE', False) + @mock.patch( + "cloudinit.user_data.features.ERROR_ON_USER_DATA_FAILURE", False + ) def test_include_bad_url_no_fail(self, mock_sleep): """Test #include with a bad URL and failure disabled""" bad_url = 'http://bad/forbidden' |