-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |