Skip to content

Commit

Permalink
PUT /admin/api/accounts/{id}
Browse files Browse the repository at this point in the history
  • Loading branch information
Gituser010 committed Dec 11, 2024
1 parent e8e0f71 commit c3b1704
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/integration/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,13 @@ def access_token(access_token_params, api):
cleanup(entity)


@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)


@pytest.fixture(scope='module')
def account_params():
suffix = get_suffix()
Expand Down
7 changes: 7 additions & 0 deletions tests/integration/test_integration_accounts.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ def test_account_can_be_created(api, account, account_params):
asserts.assert_resource_params(account, account_params)


def test_account_update(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 All @@ -23,5 +29,6 @@ def test_account_can_be_read_by_name(api, account, account_params):
asserts.assert_resource(read)
asserts.assert_resource_params(read, account_params)


def test_users_list(api, account):
assert len(account.users.list()) >= 1

0 comments on commit c3b1704

Please sign in to comment.