@@ -792,12 +792,12 @@ def setUp(self):
792792 def test_logger_metadata (self ):
793793 """Validate logger metadata. Makes sure url is stripped by helpers.strip_url function."""
794794 expected_metadata = {
795- 'component' : 'TronCollector ' , 'url' : 'test.com' }
795+ 'component' : 'EvmHttpCollector ' , 'url' : 'test.com' }
796796 self .assertEqual (expected_metadata ,
797797 self .evmhttp_collector ._logger_metadata )
798798
799799 def test_https_interface_created (self ):
800- """Tests that the Tron collector calls the https interface with the correct args"""
800+ """Tests that the EvmHttp collector calls the https interface with the correct args"""
801801 self .mocked_connection .assert_called_once_with (
802802 self .url , self .open_timeout , self .ping_timeout )
803803
@@ -832,12 +832,16 @@ def test_block_height_raises_value_error(self):
832832 self .evmhttp_collector .block_height ()
833833
834834 def test_client_version (self ):
835- """Tests the client_version function uses the correct call to get client version"""
836- self .mocked_connection .return_value .cached_json_rpc_post .return_value = "Tron/v1.0.0"
837- result = self .evmhttp_collector .client_version ()
838- self .mocked_connection .return_value .cached_json_rpc_post .assert_called_once_with (
839- self .evmhttp_collector .client_version_payload )
840- self .assertEqual (result , {"client_version" : "Tron/v1.0.0" })
835+ """Tests the client_version function uses the correct call and args to get client version"""
836+ payload = {
837+ "jsonrpc" : "2.0" ,
838+ "method" : "web3_clientVersion" ,
839+ "params" : [],
840+ "id" : self .chain_id
841+ }
842+ self .evmhttp_collector .client_version ()
843+ self .mocked_websocket .return_value .cached_query .assert_called_once_with (
844+ payload )
841845
842846 def test_client_version_returns_none (self ):
843847 """Tests that the client_version returns None if cached_json_rpc_post returns None"""
0 commit comments