From b730009d78ad2dc71e9d64714074ec1f63d10260 Mon Sep 17 00:00:00 2001 From: Daniel Watkins Date: Thu, 2 Jul 2020 16:42:14 -0400 Subject: [PATCH] test_data: fix faulty patch 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. --- tests/unittests/test_data.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/unittests/test_data.py b/tests/unittests/test_data.py index 7fb9c3abc30..fb2b55e8e79 100644 --- a/tests/unittests/test_data.py +++ b/tests/unittests/test_data.py @@ -648,7 +648,9 @@ def test_include_bad_url(self, mock_sleep): 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'