Skip to content

Commit c495cfe

Browse files
committed
commenting on the test until the new governance come
1 parent 5f5eaa2 commit c495cfe

File tree

1 file changed

+100
-100
lines changed

1 file changed

+100
-100
lines changed

tests/e2e_tests/test_delegate.py

Lines changed: 100 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -380,103 +380,103 @@ def test_nominator_min_required_stake(
380380
assert stake == Balance(0)
381381

382382

383-
def test_get_vote_data(subtensor, alice_wallet):
384-
"""
385-
Tests:
386-
- Sends Propose
387-
- Checks existing Proposals
388-
- Votes
389-
- Checks Proposal is updated
390-
"""
391-
392-
subtensor.root_register(alice_wallet)
393-
394-
proposals = subtensor.query_map(
395-
"Triumvirate",
396-
"ProposalOf",
397-
params=[],
398-
)
399-
400-
assert proposals.records == []
401-
402-
success, error = propose(
403-
subtensor,
404-
alice_wallet,
405-
proposal=subtensor.substrate.compose_call(
406-
call_module="Triumvirate",
407-
call_function="set_members",
408-
call_params={
409-
"new_members": [],
410-
"prime": None,
411-
"old_count": 0,
412-
},
413-
),
414-
duration=1_000_000,
415-
)
416-
417-
assert error == ""
418-
assert success is True
419-
420-
proposals = subtensor.query_map(
421-
"Triumvirate",
422-
"ProposalOf",
423-
params=[],
424-
)
425-
proposals = {
426-
bytes(proposal_hash[0]): proposal.value for proposal_hash, proposal in proposals
427-
}
428-
429-
assert list(proposals.values()) == [
430-
{
431-
"Triumvirate": (
432-
{
433-
"set_members": {
434-
"new_members": (),
435-
"prime": None,
436-
"old_count": 0,
437-
},
438-
},
439-
),
440-
},
441-
]
442-
443-
proposal_hash = list(proposals.keys())[0]
444-
proposal_hash = f"0x{proposal_hash.hex()}"
445-
446-
proposal = subtensor.get_vote_data(
447-
proposal_hash,
448-
)
449-
450-
assert proposal == ProposalVoteData(
451-
ayes=[],
452-
end=CloseInValue(1_000_000, subtensor.block),
453-
index=0,
454-
nays=[],
455-
threshold=3,
456-
)
457-
458-
success, error = vote(
459-
subtensor,
460-
alice_wallet,
461-
alice_wallet.hotkey.ss58_address,
462-
proposal_hash,
463-
index=0,
464-
approve=True,
465-
)
466-
467-
assert error == ""
468-
assert success is True
469-
470-
proposal = subtensor.get_vote_data(
471-
proposal_hash,
472-
)
473-
474-
assert proposal == ProposalVoteData(
475-
ayes=[
476-
alice_wallet.hotkey.ss58_address,
477-
],
478-
end=CloseInValue(1_000_000, subtensor.block),
479-
index=0,
480-
nays=[],
481-
threshold=3,
482-
)
383+
# def test_get_vote_data(subtensor, alice_wallet):
384+
# """
385+
# Tests:
386+
# - Sends Propose
387+
# - Checks existing Proposals
388+
# - Votes
389+
# - Checks Proposal is updated
390+
# """
391+
#
392+
# subtensor.root_register(alice_wallet)
393+
#
394+
# proposals = subtensor.query_map(
395+
# "Triumvirate",
396+
# "ProposalOf",
397+
# params=[],
398+
# )
399+
#
400+
# assert proposals.records == []
401+
#
402+
# success, error = propose(
403+
# subtensor,
404+
# alice_wallet,
405+
# proposal=subtensor.substrate.compose_call(
406+
# call_module="Triumvirate",
407+
# call_function="set_members",
408+
# call_params={
409+
# "new_members": [],
410+
# "prime": None,
411+
# "old_count": 0,
412+
# },
413+
# ),
414+
# duration=1_000_000,
415+
# )
416+
#
417+
# assert error == ""
418+
# assert success is True
419+
#
420+
# proposals = subtensor.query_map(
421+
# "Triumvirate",
422+
# "ProposalOf",
423+
# params=[],
424+
# )
425+
# proposals = {
426+
# bytes(proposal_hash[0]): proposal.value for proposal_hash, proposal in proposals
427+
# }
428+
#
429+
# assert list(proposals.values()) == [
430+
# {
431+
# "Triumvirate": (
432+
# {
433+
# "set_members": {
434+
# "new_members": (),
435+
# "prime": None,
436+
# "old_count": 0,
437+
# },
438+
# },
439+
# ),
440+
# },
441+
# ]
442+
#
443+
# proposal_hash = list(proposals.keys())[0]
444+
# proposal_hash = f"0x{proposal_hash.hex()}"
445+
#
446+
# proposal = subtensor.get_vote_data(
447+
# proposal_hash,
448+
# )
449+
#
450+
# assert proposal == ProposalVoteData(
451+
# ayes=[],
452+
# end=CloseInValue(1_000_000, subtensor.block),
453+
# index=0,
454+
# nays=[],
455+
# threshold=3,
456+
# )
457+
#
458+
# success, error = vote(
459+
# subtensor,
460+
# alice_wallet,
461+
# alice_wallet.hotkey.ss58_address,
462+
# proposal_hash,
463+
# index=0,
464+
# approve=True,
465+
# )
466+
#
467+
# assert error == ""
468+
# assert success is True
469+
#
470+
# proposal = subtensor.get_vote_data(
471+
# proposal_hash,
472+
# )
473+
#
474+
# assert proposal == ProposalVoteData(
475+
# ayes=[
476+
# alice_wallet.hotkey.ss58_address,
477+
# ],
478+
# end=CloseInValue(1_000_000, subtensor.block),
479+
# index=0,
480+
# nays=[],
481+
# threshold=3,
482+
# )

0 commit comments

Comments
 (0)