Skip to content

Commit 3bca5a8

Browse files
committed
Fixed tests: taskName was added in logging:3.12
1 parent fd5596d commit 3bca5a8

File tree

5 files changed

+12
-2
lines changed

5 files changed

+12
-2
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,9 @@ LOGGING = {
322322

323323
## Release Notes
324324

325+
- 4.1.2
326+
- Fix DeprecationWarning
327+
- Adjusted tests to logging:3.12
325328
- 4.1.1
326329
- Fix flusher issues with serverless
327330
- 4.1.0

requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
requests>=2.27.0
22
protobuf>=3.20.2
3-
setuptools>=68.0.0 # not directly required, pinned to avoid a vulnerability
3+
setuptools>=68.0.0 # not directly required, pinned to avoid a vulnerability
4+
future>=0.18.3 # used in tests

tests/mockLogzioListener/listener.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# noinspection PyUnresolvedReferences
2+
import future
23
import socket
34
from http.server import BaseHTTPRequestHandler, HTTPServer
45
from threading import Thread

tests/test_logzioHandler.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ def test_json(self):
4444
'message': 'this is a test: moo.',
4545
'path_name': 'handler_test.py',
4646
'severity': 'NOTSET',
47+
'taskName': None,
4748
'type': 'python'
4849
}
4950
)
@@ -72,6 +73,7 @@ def test_string(self):
7273
'logger': 'my-logger',
7374
'message': 'this is a test: moo.',
7475
'path_name': 'handler_test.py',
76+
'taskName': None,
7577
'type': 'python'
7678
}
7779
)
@@ -102,6 +104,7 @@ def test_extra_formatting(self):
102104
'logger': 'my-logger',
103105
'message': 'this is a test: moo.',
104106
'path_name': 'handler_test.py',
107+
'taskName': None,
105108
'type': 'python',
106109
'extra_key': 'extra_value'
107110
}
@@ -131,6 +134,7 @@ def test_format_string_message(self):
131134
'logger': 'my-logger',
132135
'message': 'this is a test: moo.',
133136
'path_name': 'handler_test.py',
137+
'taskName': None,
134138
'type': 'python'
135139
}
136140
)
@@ -171,6 +175,7 @@ def test_exception(self):
171175
'message': 'exception test:',
172176
'exception': 'Traceback (most recent call last):\n\n File "", in test_exception\n raise ValueError("oops.")\n\nValueError: oops.\n',
173177
'path_name': 'handler_test.py',
178+
'taskName': None,
174179
'type': 'python',
175180
'tags': ['staging', 'experimental']
176181
},

tests/test_logzioSender.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def setUp(self):
2323
self.logzio_listener = listener.MockLogzioListener()
2424
self.logzio_listener.clear_logs_buffer()
2525
self.logzio_listener.clear_server_error()
26-
self.logs_drain_timeout = 1
26+
self.logs_drain_timeout = 2
2727
self.retries_no = 4
2828
self.retry_timeout = 2
2929

0 commit comments

Comments
 (0)