Skip to content

Commit 5010494

Browse files
committed
Configure unit tests
1 parent 3b33800 commit 5010494

29 files changed

+207
-206
lines changed

celo_sdk/contracts/AccountsWrapper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ def set_account(self, name: str, data_encryption_key: str, wallet_address: str,
355355
name, data_encryption_key, wallet_address, proof_of_possession.v, self.web3.toBytes(proof_of_possession.r), self.web3.toBytes(proof_of_possession.s))
356356
else:
357357
func_call = self._contract.functions.setAccount(
358-
name, data_encryption_key, wallet_address, '0x0', '0x0', '0x0')
358+
name, data_encryption_key, wallet_address, 0, self.web3.toBytes('0x0'), self.web3.toBytes('0x0'))
359359
return self.__wallet.send_transaction(func_call)
360360

361361
def set_name(self, name: str) -> str:

celo_sdk/contracts/AttestationsWrapper.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def __init__(self, web3: Web3, registry: Registry, address: str, abi: list, wall
4646

4747
def parse_get_completable_attestations(self, response: list) -> list:
4848
metadata_urls = attestations_utils.parse_solidity_string_array(
49-
response[2], response[3]) # TODO: check response[3] data type
49+
response[2], response[3])
5050

5151
return [{'block_number': el[0], 'issuer': el[1], 'metadata_url': el[2]} for el in attestations_utils.zip3(response[0], response[1], metadata_urls)]
5252

@@ -228,7 +228,6 @@ def get_non_compliant_issuers(self, identifier: str, account: str) -> list:
228228

229229
return [attest['issuer'] for attest in results if not attest['is_valid']]
230230

231-
# TODO: test how signature is reconstracting
232231
def complete(self, identifier: str, account: str, issuer: str, code: str) -> str:
233232
"""
234233
Completes an attestation with the corresponding code
@@ -262,7 +261,6 @@ def complete(self, identifier: str, account: str, issuer: str, code: str) -> str
262261

263262
return self.__wallet.send_transaction(func_call)
264263

265-
# TODO: test how signature is reconstracting and signer address
266264
def find_matching_issuer(self, identifier: str, account: str, code: str, issuers: list) -> str:
267265
"""
268266
Given a list of issuers, finds the matching issuer for a given code
@@ -371,7 +369,6 @@ def select_issuers(self, identifier: str) -> str:
371369
func_call = self._contract.functions.selectIssuers()
372370
return self.__wallet.send_transaction(func_call)
373371

374-
# TODO: test request to the service
375372
def reveal_phone_number_to_issuer(self, phone_number: str, account: str, issuer: str, service_url: str, pepper: str = None, sms_retriver_app_sig: str = None) -> dict:
376373
body = {'account': account,
377374
'phoneNumber': phone_number,
@@ -412,7 +409,6 @@ def validate_attestation_code(self, identifier: str, account: str, issuer: str,
412409

413410
return result != self.null_address
414411

415-
# TODO: test with real data and requests to the third patry services
416412
def get_attestation_service_status(self, validator: dict) -> dict:
417413
"""
418414
Gets the relevant attestation service status for a validator

celo_sdk/contracts/DoubleSigningSlasherWrapper.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from web3 import Web3
77

88

9-
# TODO: test when other called SC wrappers will be written and callable
109
class DoubleSigningSlasher(BaseWrapper):
1110
"""
1211
Contract handling slashing for Validator double-signing

celo_sdk/contracts/DowntimeSlasherWrapper.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from web3 import Web3
77

88

9-
# TODO: test when other called SC wrappers will be written and callable
109
class DowntimeSlasher(BaseWrapper):
1110
"""
1211
Contract handling slashing for Validator downtime using intervals

celo_sdk/contracts/ElectionWrapper.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from web3 import Web3
77

88

9-
# TODO: test when other called SC wrappers will be written and callable
109
class Election(BaseWrapper):
1110
"""
1211
Contract for voting for validators and managing validator groups

celo_sdk/contracts/EscrowWrapper.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from web3 import Web3
77

88

9-
# TODO: test when other called SC wrappers will be written and callable
109
class Escrow(BaseWrapper):
1110
"""
1211
Contract for handling reserve for stable currencies

celo_sdk/contracts/ExchangeWrapper.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from web3 import Web3
77

88

9-
# TODO: test when other called SC wrappers will be written and callable
109
class Exchange(BaseWrapper):
1110
"""
1211
Contract that allows to exchange StableToken for GoldToken and vice versa

celo_sdk/contracts/FreezerWrapper.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from web3 import Web3
77

88

9-
# TODO: test when other called SC wrappers will be written and callable
109
class Freezer(BaseWrapper):
1110
"""
1211
Attributes:

celo_sdk/contracts/GovernanceWrapper.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
from celo_sdk.registry import Registry
99

1010

11-
# TODO: test when other called SC wrappers will be written and callable
1211
class Governance(BaseWrapper):
1312
"""
1413
Contract managing voting for governance proposals
@@ -539,7 +538,6 @@ def _lesser_and_greater(self, proposal_id: int, queue: List[dict] = []) -> dict:
539538
def _sort_func(self, e):
540539
return e['proposal_id']
541540

542-
# TODO: check if the order is correct
543541
def sorted_queue(self, queue: List[dict]) -> List[dict]:
544542
return queue.sort(key=self._sort_func)
545543

celo_sdk/contracts/LockedGoldWrapper.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
from celo_sdk.utils import utils
1010

1111

12-
# TODO: test when other called SC wrappers will be written and callable
1312
class LockedGold(BaseWrapper):
1413
"""
1514
Contract for handling deposits needed for voting

0 commit comments

Comments
 (0)