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 Oct 15, 2024
1 parent 1c55c11 commit 25a8acf
Show file tree
Hide file tree
Showing 2 changed files with 17 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
10 changes: 10 additions & 0 deletions tests/integration/test_integration_accounts.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import secrets

import pytest

from tests.integration import asserts


Expand All @@ -11,6 +15,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 25a8acf

Please sign in to comment.