Skip to content

Commit

Permalink
add integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mvadari committed Oct 24, 2023
1 parent 60fb57b commit 52e0d2c
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
31 changes: 31 additions & 0 deletions tests/integration/transactions/test_did_delete.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
from tests.integration.integration_test_case import IntegrationTestCase
from tests.integration.it_utils import (
sign_and_reliable_submission_async,
test_async_and_sync,
)
from tests.integration.reusable_values import WALLET
from xrpl.models.response import ResponseStatus
from xrpl.models.transactions import DIDDelete, DIDSet

_VALID_FIELD = "1234567890abcdefABCDEF"


class TestDIDSet(IntegrationTestCase):
@test_async_and_sync(globals())
async def test_basic(self, client):
# Create DID to delete
setup_tx = DIDSet(
account=WALLET.address,
did_document=_VALID_FIELD,
uri=_VALID_FIELD,
data=_VALID_FIELD,
)
response = await sign_and_reliable_submission_async(setup_tx, WALLET, client)
self.assertEqual(response.status, ResponseStatus.SUCCESS)

# Create DID to delete
tx = DIDDelete(
account=WALLET.address,
)
response = await sign_and_reliable_submission_async(tx, WALLET, client)
self.assertEqual(response.status, ResponseStatus.SUCCESS)
23 changes: 23 additions & 0 deletions tests/integration/transactions/test_did_set.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
from tests.integration.integration_test_case import IntegrationTestCase
from tests.integration.it_utils import (
sign_and_reliable_submission_async,
test_async_and_sync,
)
from tests.integration.reusable_values import WALLET
from xrpl.models.response import ResponseStatus
from xrpl.models.transactions import DIDSet

_VALID_FIELD = "1234567890abcdefABCDEF"


class TestDIDSet(IntegrationTestCase):
@test_async_and_sync(globals())
async def test_all_fields(self, client):
tx = DIDSet(
account=WALLET.address,
did_document=_VALID_FIELD,
uri=_VALID_FIELD,
data=_VALID_FIELD,
)
response = await sign_and_reliable_submission_async(tx, WALLET, client)
self.assertEqual(response.status, ResponseStatus.SUCCESS)

0 comments on commit 52e0d2c

Please sign in to comment.