Skip to content

Commit

Permalink
revert integration test suite updates to AccountObjects RPC
Browse files Browse the repository at this point in the history
  • Loading branch information
ckeshava committed Jan 15, 2025
1 parent d42ebb9 commit cb9ec77
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 21 deletions.
6 changes: 3 additions & 3 deletions tests/integration/transactions/test_credential.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
test_async_and_sync,
)
from tests.integration.reusable_values import DESTINATION, WALLET
from xrpl.models import AccountObjects, LedgerEntryType
from xrpl.models import AccountObjects, AccountObjectType
from xrpl.models.requests.ledger_entry import Credential, LedgerEntry
from xrpl.models.response import ResponseStatus
from xrpl.models.transactions.credential_accept import CredentialAccept
Expand Down Expand Up @@ -96,7 +96,7 @@ async def test_valid(self, client):
# The credential ledger object must be deleted from both the Issuer and Subject
# account's directory pages
account_objects_response = await client.request(
AccountObjects(account=_ISSUER, type=LedgerEntryType.CREDENTIAL)
AccountObjects(account=_ISSUER, type=AccountObjectType.CREDENTIAL)
)
self.assertFalse(
is_cred_object_present(
Expand All @@ -110,7 +110,7 @@ async def test_valid(self, client):
# Verify that the Credential object has been deleted from the Subject's
# directory page as well
account_objects_response = await client.request(
AccountObjects(account=_SUBJECT, type=LedgerEntryType.CREDENTIAL)
AccountObjects(account=_SUBJECT, type=AccountObjectType.CREDENTIAL)
)
self.assertFalse(
is_cred_object_present(
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/transactions/test_delete_oracle.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
test_async_and_sync,
)
from tests.integration.reusable_values import WALLET
from xrpl.models import AccountObjects, LedgerEntryType, OracleDelete, OracleSet
from xrpl.models import AccountObjects, AccountObjectType, OracleDelete, OracleSet
from xrpl.models.response import ResponseStatus
from xrpl.models.transactions.oracle_set import PriceData
from xrpl.utils import str_to_hex
Expand Down Expand Up @@ -54,6 +54,6 @@ async def test_basic(self, client):

# confirm that the PriceOracle was actually deleted
account_objects_response = await client.request(
AccountObjects(account=WALLET.address, type=LedgerEntryType.ORACLE)
AccountObjects(account=WALLET.address, type=AccountObjectType.ORACLE)
)
self.assertEqual(len(account_objects_response.result["account_objects"]), 0)
6 changes: 3 additions & 3 deletions tests/integration/transactions/test_did_delete.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
test_async_and_sync,
)
from tests.integration.reusable_values import WALLET
from xrpl.models import AccountObjects, DIDDelete, DIDSet, LedgerEntryType
from xrpl.models import AccountObjects, AccountObjectType, DIDDelete, DIDSet
from xrpl.models.response import ResponseStatus

_VALID_FIELD = "1234567890abcdefABCDEF"
Expand All @@ -26,7 +26,7 @@ async def test_basic(self, client):

# confirm that the DID was actually created
account_objects_response = await client.request(
AccountObjects(account=WALLET.address, type=LedgerEntryType.DID)
AccountObjects(account=WALLET.address, type=AccountObjectType.DID)
)
self.assertEqual(len(account_objects_response.result["account_objects"]), 1)

Expand All @@ -40,6 +40,6 @@ async def test_basic(self, client):

# confirm that the DID was actually deleted
account_objects_response = await client.request(
AccountObjects(account=WALLET.address, type=LedgerEntryType.DID)
AccountObjects(account=WALLET.address, type=AccountObjectType.DID)
)
self.assertEqual(len(account_objects_response.result["account_objects"]), 0)
4 changes: 2 additions & 2 deletions tests/integration/transactions/test_did_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
test_async_and_sync,
)
from tests.integration.reusable_values import WALLET
from xrpl.models import AccountObjects, DIDSet, LedgerEntryType
from xrpl.models import AccountObjects, AccountObjectType, DIDSet
from xrpl.models.response import ResponseStatus

_VALID_FIELD = "1234567890abcdefABCDEF"
Expand All @@ -25,6 +25,6 @@ async def test_all_fields(self, client):

# confirm that the DID was actually created
account_objects_response = await client.request(
AccountObjects(account=WALLET.address, type=LedgerEntryType.DID)
AccountObjects(account=WALLET.address, type=AccountObjectType.DID)
)
self.assertEqual(len(account_objects_response.result["account_objects"]), 1)
4 changes: 2 additions & 2 deletions tests/integration/transactions/test_set_oracle.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
test_async_and_sync,
)
from tests.integration.reusable_values import WALLET
from xrpl.models import AccountObjects, LedgerEntryType, OracleSet
from xrpl.models import AccountObjects, AccountObjectType, OracleSet
from xrpl.models.response import ResponseStatus
from xrpl.models.transactions.oracle_set import PriceData
from xrpl.utils import str_to_hex
Expand Down Expand Up @@ -54,7 +54,7 @@ async def test_all_fields(self, client):

# confirm that the PriceOracle was actually created
account_objects_response = await client.request(
AccountObjects(account=WALLET.address, type=LedgerEntryType.ORACLE)
AccountObjects(account=WALLET.address, type=AccountObjectType.ORACLE)
)

# subsequent integration tests (sync/async + json/websocket) add one
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from xrpl.core.keypairs import sign
from xrpl.models import (
AccountObjects,
LedgerEntryType,
AccountObjectType,
XChainAddAccountCreateAttestation,
)
from xrpl.utils import xrp_to_drops
Expand All @@ -26,7 +26,7 @@ async def test_basic_functionality(self, client):
account_objects = await client.request(
AccountObjects(
account=BRIDGE.xchain_bridge.locking_chain_door,
type=LedgerEntryType.BRIDGE,
type=AccountObjectType.BRIDGE,
)
)
bridge_obj = account_objects.result["account_objects"][0]
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/transactions/test_xchain_create_bridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from xrpl.models import (
XRP,
AccountObjects,
LedgerEntryType,
AccountObjectType,
XChainBridge,
XChainCreateBridge,
)
Expand Down Expand Up @@ -40,7 +40,7 @@ async def test_basic_functionality(self, client):

account_objects_response = await client.request(
AccountObjects(
account=door_wallet.classic_address, type=LedgerEntryType.BRIDGE
account=door_wallet.classic_address, type=AccountObjectType.BRIDGE
)
)
self.assertEqual(len(account_objects_response.result["account_objects"]), 1)
4 changes: 2 additions & 2 deletions tests/integration/transactions/test_xchain_create_claim_id.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
test_async_and_sync,
)
from tests.integration.reusable_values import BRIDGE
from xrpl.models import AccountObjects, LedgerEntryType, XChainCreateClaimID
from xrpl.models import AccountObjects, AccountObjectType, XChainCreateClaimID
from xrpl.wallet import Wallet


Expand All @@ -30,7 +30,7 @@ async def test_basic_functionality(self, client):
account_objects_response = await client.request(
AccountObjects(
account=account.classic_address,
type=LedgerEntryType.XCHAIN_OWNED_CLAIM_ID,
type=AccountObjectType.XCHAIN_OWNED_CLAIM_ID,
)
)
self.assertEqual(len(account_objects_response.result["account_objects"]), 1)
6 changes: 3 additions & 3 deletions tests/integration/transactions/test_xchain_modify_bridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from xrpl.models import (
XRP,
AccountObjects,
LedgerEntryType,
AccountObjectType,
XChainBridge,
XChainCreateBridge,
XChainModifyBridge,
Expand Down Expand Up @@ -41,7 +41,7 @@ async def test_basic_functionality(self, client):

account_objects1 = await client.request(
AccountObjects(
account=door_wallet.classic_address, type=LedgerEntryType.BRIDGE
account=door_wallet.classic_address, type=AccountObjectType.BRIDGE
)
)
self.assertEqual(len(account_objects1.result["account_objects"]), 1)
Expand All @@ -67,7 +67,7 @@ async def test_basic_functionality(self, client):

account_objects2 = await client.request(
AccountObjects(
account=door_wallet.classic_address, type=LedgerEntryType.BRIDGE
account=door_wallet.classic_address, type=AccountObjectType.BRIDGE
)
)
self.assertEqual(len(account_objects2.result["account_objects"]), 1)
Expand Down

0 comments on commit cb9ec77

Please sign in to comment.