File tree Expand file tree Collapse file tree 1 file changed +0
-36
lines changed Expand file tree Collapse file tree 1 file changed +0
-36
lines changed Original file line number Diff line number Diff line change 5
5
import logging
6
6
import logging .config
7
7
import os
8
- import textwrap
9
8
10
9
import jsonschema
11
10
@@ -22,41 +21,6 @@ def assert_records(records):
22
21
return details
23
22
24
23
25
- def test_initialization_from_ini (caplog , tmpdir ):
26
- ini_content = textwrap .dedent (
27
- """
28
- [loggers]
29
- keys = root
30
-
31
- [handlers]
32
- keys = console
33
-
34
- [formatters]
35
- keys = json
36
-
37
- [logger_root]
38
- level = INFO
39
- handlers = console
40
-
41
- [handler_console]
42
- class = StreamHandler
43
- level = DEBUG
44
- args = (sys.stderr,)
45
- formatter = json
46
-
47
- [formatter_json]
48
- class = dockerflow.logging.JsonLogFormatter
49
- """
50
- )
51
- ini_file = tmpdir .join ("logging.ini" )
52
- ini_file .write (ini_content )
53
- logging .config .fileConfig (str (ini_file ))
54
- logging .info ("I am logging in mozlog format now! woo hoo!" )
55
- logger = logging .getLogger ()
56
- assert len (logger .handlers ) > 0
57
- assert logger .handlers [0 ].formatter .logger_name == "Dockerflow"
58
-
59
-
60
24
def test_basic_operation (caplog ):
61
25
"""Ensure log formatter contains all the expected fields and values"""
62
26
message_text = "simple test"
You can’t perform that action at this time.
0 commit comments