diff --git a/pytest.ini b/pytest.ini index 994e939cb..8bc54e713 100644 --- a/pytest.ini +++ b/pytest.ini @@ -17,7 +17,5 @@ filterwarnings = ignore:datetime.datetime.utcfromtimestamp\(\) is deprecated:DeprecationWarning:google.cloud.logging_v2.handlers.transports ignore:datetime.datetime.utcnow\(\) is deprecated:DeprecationWarning:tests.unit.test__http ignore:datetime.datetime.utcnow\(\) is deprecated:DeprecationWarning:tests.unit.test_entries - # Remove once https://github.com/googleapis/python-logging/issues/820 is fixed - ignore:.*warn.*is deprecated, use.*warning.*instead:DeprecationWarning # Remove once a version of grpcio newer than 1.59.3 is released to PyPI ignore:datetime.datetime.utcnow\(\) is deprecated:DeprecationWarning:grpc._channel diff --git a/tests/system/test_system.py b/tests/system/test_system.py index ec67a99d0..821a938df 100644 --- a/tests/system/test_system.py +++ b/tests/system/test_system.py @@ -605,7 +605,7 @@ def test_handlers_w_extras(self): "resource": Resource(type="cloudiot_device", labels={}), "labels": {"test-label": "manual"}, } - cloud_logger.warn(LOG_MESSAGE, extra=extra) + cloud_logger.warning(LOG_MESSAGE, extra=extra) entries = _list_entries(logger) self.assertEqual(len(entries), 1) @@ -634,7 +634,7 @@ def test_handlers_w_json_fields(self): cloud_logger = logging.getLogger(LOGGER_NAME) cloud_logger.addHandler(handler) extra = {"json_fields": {"hello": "world", "two": 2}} - cloud_logger.warn(LOG_MESSAGE, extra=extra) + cloud_logger.warning(LOG_MESSAGE, extra=extra) entries = _list_entries(logger) self.assertEqual(len(entries), 1)