diff --git a/logging/tests/unit/handlers/transports/test_background_thread.py b/logging/tests/unit/handlers/transports/test_background_thread.py index ccc244fa65c8..3e3378dcd361 100644 --- a/logging/tests/unit/handlers/transports/test_background_thread.py +++ b/logging/tests/unit/handlers/transports/test_background_thread.py @@ -290,8 +290,8 @@ def __init__(self): def log_struct(self, info, severity=logging.INFO, resource=None): from google.cloud.logging.logger import _GLOBAL_RESOURCE - if resource is None: - resource = _GLOBAL_RESOURCE + assert resource is None + resource = _GLOBAL_RESOURCE self.log_struct_called_with = (info, severity, resource) self.entries.append(info)