6-PYTHON-API: Fix py tests for queue
This commit is contained in:
parent
1d1dea8813
commit
f16d2573ee
|
@ -12,7 +12,6 @@ from solana.publickey import PublicKey
|
|||
from solana.keypair import Keypair
|
||||
from solana.system_program import CreateAccountParams, create_account
|
||||
from switchboardpy.common import SwitchboardDecimal
|
||||
|
||||
from switchboardpy.common import AccountParams
|
||||
|
||||
from .generated.accounts import OracleQueueAccountData
|
||||
|
@ -184,7 +183,8 @@ class OracleQueueAccount:
|
|||
"minimum_delay_seconds": params.minimum_delay_seconds or 5,
|
||||
"queue_size": params.queue_size or 0,
|
||||
"unpermissioned_feeds": params.unpermissioned_feeds or False,
|
||||
"mint": params.mint
|
||||
"unpermissioned_vrf": params.unpermissioned_feeds or False,
|
||||
"enable_buffer_relayers": False
|
||||
},
|
||||
ctx=anchorpy.Context(
|
||||
accounts={
|
||||
|
@ -192,7 +192,8 @@ class OracleQueueAccount:
|
|||
"authority": params.authority,
|
||||
"buffer": buffer.public_key,
|
||||
"system_program": system_program.SYS_PROGRAM_ID,
|
||||
"payer": program.provider.wallet.public_key
|
||||
"payer": program.provider.wallet.public_key,
|
||||
"mint": params.mint
|
||||
},
|
||||
signers=[oracle_queue_account, buffer],
|
||||
pre_instructions=[
|
||||
|
|
|
@ -14,6 +14,7 @@ from solana.keypair import Keypair
|
|||
from solana.publickey import PublicKey
|
||||
from solana.rpc.async_api import AsyncClient
|
||||
from anchorpy import Program, Provider, Wallet
|
||||
from switchboardpy.program import ProgramStateAccount
|
||||
|
||||
ORACLE_QUEUE_STANDARD_DEVNET = 'F8ce7MsckeZAbAGmxjJNetxYXQa9mKr9nnrC3qKubyYy' # <-- new key | old key - 'B4yBQ3hYcjnrNLxUnauJqwpFJnjtm7s8gHybgkAdgXhQ';
|
||||
|
||||
|
@ -44,6 +45,8 @@ async def test_load_data():
|
|||
@mark.asyncio
|
||||
async def test_create():
|
||||
async with SwitchboardProgram() as program:
|
||||
program_state_account, state_bump = ProgramStateAccount.from_seed(program)
|
||||
switch_token_mint = await program_state_account.get_token_mint()
|
||||
await OracleQueueAccount.create(
|
||||
program=program,
|
||||
params=OracleQueueInitParams(
|
||||
|
@ -51,5 +54,6 @@ async def test_create():
|
|||
min_stake=300,
|
||||
authority=program.provider.wallet.public_key, #
|
||||
oracle_timeout=20000,
|
||||
mint=switch_token_mint.pubkey
|
||||
)
|
||||
)
|
Loading…
Reference in New Issue