Skip to content

Commit e8e0f71

Browse files
committed
done /adim/api/acount_plans/{id}.json
1 parent 7b7f1e4 commit e8e0f71

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

tests/integration/conftest.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,13 @@ def webhook(api):
498498
return api.webhooks
499499

500500

501+
@pytest.fixture(scope='module')
502+
def account_plans_update_params():
503+
suffix = secrets.token_urlsafe(8)
504+
name = f"updated-{suffix}"
505+
return dict(name=name, description=name)
506+
507+
501508
@pytest.fixture(scope='module')
502509
def account_plans_params():
503510
suffix = get_suffix()
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
from tests.integration import asserts
2+
3+
def test_account_plans_list(api, account_plan):
4+
account_plans = api.account_plans.list()
5+
assert len(account_plans) >= 1
6+
7+
8+
def test_account_plan_can_be_created(api, account_plan, account_plans_params):
9+
asserts.assert_resource(account_plan)
10+
asserts.assert_resource_params(account_plan, account_plans_params)
11+
12+
13+
def test_account_plan_update(account_plan, account_plans_update_params):
14+
updated_account_plan = account_plan.update(params=account_plans_update_params)
15+
asserts.assert_resource(updated_account_plan)
16+
asserts.assert_resource_params(updated_account_plan, account_plans_update_params)
17+
18+
19+
def test_account_plan_can_be_read(api, account_plan, account_plans_params):
20+
read = api.account_plans.read(account_plan.entity_id)
21+
asserts.assert_resource(read)
22+
asserts.assert_resource_params(read, account_plans_params)

0 commit comments

Comments
 (0)