* Allow users to explicitly configure universe domain
* Added placeholder kwargs to StructuredLogHandler
* Allowed for a partial override of loggers that get excluded
from setup_client
* Remove usage in including_default_value_fields to prepare for
protobuf 5.x
* Use value of cluster-location in GKE for tagging location
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:google/python-google-cloud-logging?expand=0&rev=5
162 lines
5.1 KiB
Diff
162 lines
5.1 KiB
Diff
--- google-cloud-logging-3.9.0/tests/unit/handlers/test_app_engine.py 2023-12-11 20:25:38.000000000 +0100
|
|
+++ google-cloud-logging-3.9.0/tests/unit/handlers/test_app_engine.py 2023-12-17 21:32:42.578993894 +0100
|
|
@@ -16,7 +16,7 @@
|
|
import pytest
|
|
import unittest
|
|
|
|
-import mock
|
|
+from unittest import mock
|
|
|
|
|
|
class TestAppEngineHandler(unittest.TestCase):
|
|
--- google-cloud-logging-3.9.0/tests/unit/handlers/test_handlers.py 2023-12-11 20:25:38.000000000 +0100
|
|
+++ google-cloud-logging-3.9.0/tests/unit/handlers/test_handlers.py 2023-12-17 21:32:42.578993894 +0100
|
|
@@ -15,7 +15,7 @@
|
|
import logging
|
|
import unittest
|
|
from unittest.mock import patch
|
|
-import mock
|
|
+from unittest import mock
|
|
import json
|
|
|
|
from google.cloud.logging_v2.handlers._monitored_resources import (
|
|
--- google-cloud-logging-3.9.0/tests/unit/handlers/test__helpers.py 2023-12-11 20:25:38.000000000 +0100
|
|
+++ google-cloud-logging-3.9.0/tests/unit/handlers/test__helpers.py 2023-12-17 21:32:42.578993894 +0100
|
|
@@ -14,7 +14,7 @@
|
|
|
|
import unittest
|
|
|
|
-import mock
|
|
+from unittest import mock
|
|
|
|
_FLASK_TRACE_ID = "flask0id"
|
|
_FLASK_SPAN_ID = "span0flask"
|
|
--- google-cloud-logging-3.9.0/tests/unit/handlers/test__monitored_resources.py 2023-12-11 20:25:38.000000000 +0100
|
|
+++ google-cloud-logging-3.9.0/tests/unit/handlers/test__monitored_resources.py 2023-12-17 21:32:42.578993894 +0100
|
|
@@ -14,7 +14,7 @@
|
|
|
|
import unittest
|
|
|
|
-import mock
|
|
+from unittest import mock
|
|
import os
|
|
import functools
|
|
|
|
--- google-cloud-logging-3.9.0/tests/unit/handlers/test_structured_log.py 2023-12-11 20:25:38.000000000 +0100
|
|
+++ google-cloud-logging-3.9.0/tests/unit/handlers/test_structured_log.py 2023-12-17 21:32:42.578993894 +0100
|
|
@@ -597,7 +597,7 @@
|
|
|
|
def test_emits_instrumentation_info(self):
|
|
import logging
|
|
- import mock
|
|
+ from unittest import mock
|
|
import google.cloud.logging_v2
|
|
|
|
handler = self._make_one()
|
|
@@ -621,7 +621,7 @@
|
|
|
|
def test_valid_instrumentation_info(self):
|
|
import logging
|
|
- import mock
|
|
+ from unittest import mock
|
|
import json
|
|
|
|
logger = logging.getLogger("google.cloud.logging_v2.handlers.structured_log")
|
|
--- google-cloud-logging-3.9.0/tests/unit/test_client.py 2023-12-11 20:25:38.000000000 +0100
|
|
+++ google-cloud-logging-3.9.0/tests/unit/test_client.py 2023-12-17 21:28:41.254921633 +0100
|
|
@@ -20,7 +20,7 @@
|
|
|
|
import unittest
|
|
|
|
-import mock
|
|
+from unittest import mock
|
|
|
|
VENEER_HEADER_REGEX = re.compile(
|
|
r"gapic\/[0-9]+\.[\w.-]+ gax\/[0-9]+\.[\w.-]+ gccl\/[0-9]+\.[\w.-]+ gl-python\/[0-9]+\.[\w.-]+ grpc\/[0-9]+\.[\w.-]+"
|
|
--- google-cloud-logging-3.9.0/tests/unit/test_entries.py 2023-12-11 20:25:38.000000000 +0100
|
|
+++ google-cloud-logging-3.9.0/tests/unit/test_entries.py 2023-12-17 21:28:41.254921633 +0100
|
|
@@ -14,7 +14,7 @@
|
|
|
|
import unittest
|
|
|
|
-import mock
|
|
+from unittest import mock
|
|
|
|
|
|
class Test_logger_name_from_path(unittest.TestCase):
|
|
--- google-cloud-logging-3.9.0/tests/unit/test__gapic.py 2023-12-11 20:25:38.000000000 +0100
|
|
+++ google-cloud-logging-3.9.0/tests/unit/test__gapic.py 2023-12-17 21:28:41.254921633 +0100
|
|
@@ -15,7 +15,7 @@
|
|
import unittest
|
|
|
|
import google.auth.credentials
|
|
-import mock
|
|
+from unittest import mock
|
|
|
|
import google.cloud.logging
|
|
from google.cloud import logging_v2
|
|
--- google-cloud-logging-3.9.0/tests/unit/test__helpers.py 2023-12-11 20:25:38.000000000 +0100
|
|
+++ google-cloud-logging-3.9.0/tests/unit/test__helpers.py 2023-12-17 21:28:41.254921633 +0100
|
|
@@ -19,7 +19,7 @@
|
|
import logging
|
|
import unittest
|
|
|
|
-import mock
|
|
+from unittest import mock
|
|
|
|
|
|
class Test_entry_from_resource(unittest.TestCase):
|
|
@@ -30,7 +30,7 @@
|
|
return entry_from_resource(resource, client, loggers)
|
|
|
|
def _payload_helper(self, key, class_name):
|
|
- import mock
|
|
+ from unittest import mock
|
|
|
|
resource = {}
|
|
if key is not None:
|
|
--- google-cloud-logging-3.9.0/tests/unit/test__http.py 2023-12-11 20:25:38.000000000 +0100
|
|
+++ google-cloud-logging-3.9.0/tests/unit/test__http.py 2023-12-17 21:28:41.254921633 +0100
|
|
@@ -14,7 +14,7 @@
|
|
|
|
import unittest
|
|
|
|
-import mock
|
|
+from unittest import mock
|
|
|
|
|
|
def _make_credentials():
|
|
--- google-cloud-logging-3.9.0/tests/unit/test_logger.py 2023-12-11 20:25:38.000000000 +0100
|
|
+++ google-cloud-logging-3.9.0/tests/unit/test_logger.py 2023-12-17 21:28:41.254921633 +0100
|
|
@@ -17,7 +17,7 @@
|
|
from copy import deepcopy
|
|
from datetime import datetime, timedelta, timezone
|
|
|
|
-import mock
|
|
+from unittest import mock
|
|
import pytest
|
|
|
|
|
|
--- google-cloud-logging-3.9.0/tests/unit/handlers/transports/test_background_thread.py 2023-12-11 20:25:38.000000000 +0100
|
|
+++ google-cloud-logging-3.9.0/tests/unit/handlers/transports/test_background_thread.py 2023-12-17 21:34:41.267663425 +0100
|
|
@@ -17,7 +17,7 @@
|
|
import queue
|
|
import unittest
|
|
|
|
-import mock
|
|
+from unittest import mock
|
|
|
|
|
|
class TestBackgroundThreadHandler(unittest.TestCase):
|
|
--- google-cloud-logging-3.9.0/tests/unit/handlers/middleware/test_request.py 2023-12-11 20:25:38.000000000 +0100
|
|
+++ google-cloud-logging-3.9.0/tests/unit/handlers/middleware/test_request.py 2023-12-17 21:35:57.065609190 +0100
|
|
@@ -14,7 +14,7 @@
|
|
|
|
import unittest
|
|
|
|
-import mock
|
|
+from unittest import mock
|
|
|
|
|
|
class DjangoBase(unittest.TestCase):
|