diff --git a/tests/integration/test_integration_accounts.py b/tests/integration/test_integration_accounts.py index 9eda751..5c6bee6 100644 --- a/tests/integration/test_integration_accounts.py +++ b/tests/integration/test_integration_accounts.py @@ -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 @@ -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)