Skip to content

Commit a291291

Browse files
committed
fix tests
1 parent e8c802f commit a291291

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/test_metrics.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class TestMetricsLoader(TestCase):
1313
def setUp(self):
1414
self.metrics_loader = MetricsLoader()
1515
self.labels = [
16-
'url', 'provider', 'blockchain', 'network_name', 'network_type',
16+
'url', 'provider', 'blockchain', 'network_name', 'network_type',
1717
'integration_maturity', 'canonical_name', 'chain_selector',
1818
'evmChainID'
1919
]
@@ -171,6 +171,7 @@ def test_collect_yields_correct_metrics(self):
171171
self.mocked_loader.return_value.heads_received_metric,
172172
self.mocked_loader.return_value.disconnects_metric,
173173
self.mocked_loader.return_value.block_height_metric,
174+
self.mocked_loader.return_value.finalized_block_height_metric,
174175
self.mocked_loader.return_value.client_version_metric,
175176
self.mocked_loader.return_value.total_difficulty_metric,
176177
self.mocked_loader.return_value.latency_metric,

src/test_registries.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,13 +148,13 @@ def test_get_collector_registry_for_aptos(self):
148148
helper_test_collector_registry(self, collector)
149149

150150
@mock.patch.dict(os.environ, {
151-
"CONFIG_FILE_PATH": "tests/fixtures/configuration_tron.yaml",
151+
"CONFIG_FILE_PATH": "tests/fixtures/configuration_evmhttp.yaml",
152152
"VALIDATION_FILE_PATH": "tests/fixtures/validation.yaml"
153153
})
154-
def test_get_collector_registry_for_tron(self):
155-
"""Tests that the Tron collector is called with the correct args"""
154+
def test_get_collector_registry_for_evmhttp(self):
155+
"""Tests that the EvmHttp collector is called with the correct args"""
156156
self.collector_registry = CollectorRegistry()
157-
with mock.patch('collectors.TronCollector', new=mock.Mock()) as collector:
157+
with mock.patch('collectors.EvmHttpCollector', new=mock.Mock()) as collector:
158158
helper_test_collector_registry(self, collector)
159159

160160
@mock.patch.dict(os.environ, {

0 commit comments

Comments
 (0)