Skip to content

Commit 67faa78

Browse files
committed
fix: some more casing issues token info and token info query
Signed-off-by: exploreriii <133720349+exploreriii@users.noreply.github.com>
1 parent b3196c7 commit 67faa78

File tree

2 files changed

+28
-28
lines changed

2 files changed

+28
-28
lines changed

tests/unit/test_token_info.py

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -78,34 +78,34 @@ def test_token_info_initialization(token_info):
7878
def test_setters(token_info):
7979
public_key = PrivateKey.generate_ed25519().public_key()
8080
token_info.set_admin_key(public_key)
81-
assert token_info.adminKey == public_key
81+
assert token_info.admin_key == public_key
8282

8383
token_info.set_kyc_key(public_key)
84-
assert token_info.kycKey == public_key
84+
assert token_info.kyc_key == public_key
8585

8686
token_info.set_freeze_key(public_key)
87-
assert token_info.freezeKey == public_key
87+
assert token_info.freeze_key == public_key
8888

8989
token_info.set_wipe_key(public_key)
90-
assert token_info.wipeKey == public_key
90+
assert token_info.wipe_key == public_key
9191

9292
token_info.set_supply_key(public_key)
93-
assert token_info.supplyKey == public_key
93+
assert token_info.supply_key == public_key
9494

9595
token_info.set_fee_schedule_key(public_key)
9696
assert token_info.fee_schedule_key == public_key
9797

9898
token_info.set_default_freeze_status(TokenFreezeStatus.FROZEN)
99-
assert token_info.defaultFreezeStatus == TokenFreezeStatus.FROZEN
99+
assert token_info.default_freeze_status == TokenFreezeStatus.FROZEN
100100

101101
token_info.set_default_kyc_status(TokenKycStatus.GRANTED)
102-
assert token_info.defaultKycStatus == TokenKycStatus.GRANTED
102+
assert token_info.default_kyc_status == TokenKycStatus.GRANTED
103103

104104
token_info.set_auto_renew_account(AccountId(0, 0, 300))
105-
assert token_info.autoRenewAccount == AccountId(0, 0, 300)
105+
assert token_info.auto_renew_account == AccountId(0, 0, 300)
106106

107107
token_info.set_auto_renew_period(Duration(3600))
108-
assert token_info.autoRenewPeriod == Duration(3600)
108+
assert token_info.auto_renew_period == Duration(3600)
109109

110110
expiry = Timestamp(1625097600, 0)
111111
token_info.set_expiry(expiry)
@@ -118,7 +118,7 @@ def test_setters(token_info):
118118
assert token_info.pause_status == TokenPauseStatus.PAUSED
119119

120120
token_info.set_supply_type(SupplyType.INFINITE)
121-
assert token_info.supplyType == SupplyType.INFINITE
121+
assert token_info.supply_type == SupplyType.INFINITE
122122

123123
def test_from_proto(proto_token_info):
124124
public_key = PrivateKey.generate_ed25519().public_key()
@@ -139,32 +139,32 @@ def test_from_proto(proto_token_info):
139139

140140
token_info = TokenInfo._from_proto(proto_token_info)
141141

142-
assert token_info.tokenId == TokenId(0, 0, 100)
142+
assert token_info.token_id == TokenId(0, 0, 100)
143143
assert token_info.name == "TestToken"
144144
assert token_info.symbol == "TST"
145145
assert token_info.decimals == 2
146-
assert token_info.totalSupply == 1000000
146+
assert token_info.total_supply == 1000000
147147
assert token_info.treasury == AccountId(0, 0, 200)
148-
assert token_info.isDeleted is False
148+
assert token_info.is_deleted is False
149149
assert token_info.memo == "Test token"
150-
assert token_info.tokenType == TokenType.FUNGIBLE_COMMON
151-
assert token_info.maxSupply == 10000000
150+
assert token_info.token_type == TokenType.FUNGIBLE_COMMON
151+
assert token_info.max_supply == 10000000
152152
assert token_info.ledger_id == b"ledger123"
153153
assert token_info.metadata == b"Test metadata"
154-
assert token_info.adminKey.to_bytes_raw() == public_key.to_bytes_raw()
155-
assert token_info.kycKey.to_bytes_raw() == public_key.to_bytes_raw()
156-
assert token_info.freezeKey.to_bytes_raw() == public_key.to_bytes_raw()
157-
assert token_info.wipeKey.to_bytes_raw() == public_key.to_bytes_raw()
158-
assert token_info.supplyKey.to_bytes_raw() == public_key.to_bytes_raw()
154+
assert token_info.admin_key.to_bytes_raw() == public_key.to_bytes_raw()
155+
assert token_info.kyc_key.to_bytes_raw() == public_key.to_bytes_raw()
156+
assert token_info.freeze_key.to_bytes_raw() == public_key.to_bytes_raw()
157+
assert token_info.wipe_key.to_bytes_raw() == public_key.to_bytes_raw()
158+
assert token_info.supply_key.to_bytes_raw() == public_key.to_bytes_raw()
159159
assert token_info.fee_schedule_key.to_bytes_raw() == public_key.to_bytes_raw()
160-
assert token_info.defaultFreezeStatus == TokenFreezeStatus.FROZEN
161-
assert token_info.defaultKycStatus == TokenKycStatus.GRANTED
162-
assert token_info.autoRenewAccount == AccountId(0, 0, 300)
163-
assert token_info.autoRenewPeriod == Duration(3600)
160+
assert token_info.default_freeze_status == TokenFreezeStatus.FROZEN
161+
assert token_info.default_kyc_status == TokenKycStatus.GRANTED
162+
assert token_info.auto_renew_account == AccountId(0, 0, 300)
163+
assert token_info.auto_renew_period == Duration(3600)
164164
assert token_info.expiry == Timestamp(1625097600, 0)
165165
assert token_info.pause_key.to_bytes_raw() == public_key.to_bytes_raw()
166166
assert token_info.pause_status == TokenPauseStatus.PAUSED.value
167-
assert token_info.supplyType.value == SupplyType.INFINITE.value
167+
assert token_info.supply_type.value == SupplyType.INFINITE.value
168168

169169
def test_to_proto(token_info):
170170
public_key = PrivateKey.generate_ed25519().public_key()

tests/unit/test_token_info_query.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,12 @@ def test_token_info_query_execute(mock_account_ids, private_key):
109109
except Exception as e:
110110
pytest.fail(f"Unexpected exception raised: {e}")
111111

112-
assert result.tokenId == token_id
112+
assert result.token_id == token_id
113113
assert result.name == "Test Token"
114114
assert result.symbol == "TEST"
115115
assert result.decimals == 8
116-
assert result.totalSupply == 100
117-
assert result.maxSupply == 10000
116+
assert result.total_supply == 100
117+
assert result.max_supply == 10000
118118
assert result.treasury == account_id
119119
assert result.auto_renew_account == renew_account_id
120120
assert result.default_freeze_status == 0

0 commit comments

Comments
 (0)