diff --git a/tests/unittests/config/test_schema.py b/tests/unittests/config/test_schema.py index 797403bc39f..a3b94eaa98f 100644 --- a/tests/unittests/config/test_schema.py +++ b/tests/unittests/config/test_schema.py @@ -451,8 +451,8 @@ def test_validateconfig_schema_non_strict_emits_warnings(self, caplog): """When strict is False validate_cloudconfig_schema emits warnings.""" schema = {"properties": {"p1": {"type": "string"}}} validate_cloudconfig_schema({"p1": -1}, schema=schema, strict=False) - assert ( - caplog.record_tuples and len(caplog.record_tuples) == 1 + assert caplog.record_tuples and ( + len(caplog.record_tuples) == 1 or len(caplog.record_tuples) == 2 ), caplog.record_tuples [(module, log_level, log_msg)] = caplog.record_tuples assert "cloudinit.config.schema" == module