2
2
import os
3
3
from unittest import mock
4
4
from nose2 .tools .decorators import with_setup
5
- from source .queryHandler .QueryHandler import ColumnInfo , Key
6
5
from source .profiler import Profiler
7
6
from source .metadata import MetadataHandler
8
7
from source .confgenerator import PrometheusConfigGenerator
@@ -68,7 +67,7 @@ def test_case01():
68
67
with mock .patch ('source.metadata.MetadataHandler._MetadataHandler__initializeTables' ) as md_init :
69
68
with mock .patch ('source.metadata.MetadataHandler._MetadataHandler__getSupportedMetrics' ) as md_supp :
70
69
with mock .patch ('source.metadata.MetadataHandler.SensorsConfig' , return_value = sensors_conf ) as md_sensConf :
71
- with mock .patch ('source.confgenerator.PrometheusConfigGenerator.host_ip' , return_value = '127.0.0.1' ) as pc_ip :
70
+ with mock .patch ('source.confgenerator.PrometheusConfigGenerator.host_ip' , return_value = '127.0.0.1' ):
72
71
logger = logging .getLogger (__name__ )
73
72
args ['logger' ] = logger
74
73
md = MetadataHandler (** args )
@@ -86,7 +85,7 @@ def test_case02():
86
85
with mock .patch ('source.metadata.MetadataHandler._MetadataHandler__initializeTables' ) as md_init :
87
86
with mock .patch ('source.metadata.MetadataHandler._MetadataHandler__getSupportedMetrics' ) as md_supp :
88
87
with mock .patch ('source.metadata.MetadataHandler.SensorsConfig' , return_value = sensors_conf ) as md_sensConf :
89
- with mock .patch ('source.confgenerator.PrometheusConfigGenerator.host_ip' , return_value = '127.0.0.1' ) as pc_ip :
88
+ with mock .patch ('source.confgenerator.PrometheusConfigGenerator.host_ip' , return_value = '127.0.0.1' ):
90
89
logger = logging .getLogger (__name__ )
91
90
args ['logger' ] = logger
92
91
md = MetadataHandler (** args )
0 commit comments