Skip to content

Commit

Permalink
PUT /adim/api/accounts/{id}
Browse files Browse the repository at this point in the history
  • Loading branch information
Gituser010 committed Oct 14, 2024
1 parent 1fec6ad commit e883746
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/integration/test_integration_accounts.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
import secrets

import pytest

from tests.integration import asserts


@pytest.fixture(scope='module')
def update_account_params():
suffix = secrets.token_urlsafe(8)
name = f"updated-{suffix}"
return dict(name=name, username=name, org_name=name)


def test_accounts_list(api, account):
accounts = api.accounts.list()
assert len(accounts) >= 1
Expand All @@ -11,6 +22,12 @@ def test_account_can_be_created(api, account, account_params):
asserts.assert_resource_params(account, account_params)


def test_account_can_be_updated(api,account,update_account_params):
updated_account = account.update(params=update_account_params)
asserts.assert_resource(updated_account)
asserts.assert_resource_params(updated_account,update_account_params)


def test_account_can_be_read(api, account, account_params):
read = api.accounts.read(account.entity_id)
asserts.assert_resource(read)
Expand Down

0 comments on commit e883746

Please sign in to comment.