1- import pytest
2-
3- from etherscan .tokens import Tokens
4-
5- ELCOIN_TOKEN_SUPPLY = '21265524714464'
6- ELCOIN_TOKEN_BALANCE = "135499"
7- AP_IKEY = 'YourAPIkey'
8- CONTRACT_ADDRESS = '0x57d90b64a1a57749b0f932f1a3395792e12e7055'
9- ADDRESS = '0xe04f27eb70e025b78871a2ad7eabe85e61212761'
10- API_KEY = 'YourAPIkey'
11-
12- def test_get_token_supply ():
13- api = Tokens (contract_address = CONTRACT_ADDRESS , api_key = (API_KEY ))
14- assert (api .get_total_supply () == ELCOIN_TOKEN_SUPPLY )
15-
16- def test_get_token_balance ():
17- api = Tokens (contract_address = CONTRACT_ADDRESS , api_key = API_KEY )
18- assert (api .get_token_balance (ADDRESS ) == ELCOIN_TOKEN_BALANCE )
1+ import unittest
2+
3+ from etherscan .tokens import Tokens
4+
5+ ELCOIN_TOKEN_SUPPLY = '21265524714464'
6+ ELCOIN_TOKEN_BALANCE = "135499"
7+ CONTRACT_ADDRESS = '0x57d90b64a1a57749b0f932f1a3395792e12e7055'
8+ ADDRESS = '0xe04f27eb70e025b78871a2ad7eabe85e61212761'
9+ API_KEY = 'YourAPIkey'
10+
11+
12+ class ProxiesTestCase (unittest .TestCase ):
13+
14+ def test_get_token_supply (self ):
15+ api = Tokens (contract_address = CONTRACT_ADDRESS , api_key = (API_KEY ))
16+ self .assertEqual (api .get_total_supply (), ELCOIN_TOKEN_SUPPLY )
17+
18+ def test_get_token_balance (self ):
19+ api = Tokens (contract_address = CONTRACT_ADDRESS , api_key = API_KEY )
20+ self .assertEqual (api .get_token_balance (ADDRESS ), ELCOIN_TOKEN_BALANCE )
0 commit comments