-
Notifications
You must be signed in to change notification settings - Fork 20
extended api tests #162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
extended api tests #162
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
20a44df
add get all applications plans test
Gituser010 7b7f1e4
done /adim/api/active_docs/{id}.json
Gituser010 e8e0f71
done /adim/api/acount_plans/{id}.json
Gituser010 c3b1704
PUT /admin/api/accounts/{id}
Gituser010 f0c6046
done /adim/api/service/{id}/backend_usages/{id}
Gituser010 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| from tests.integration import asserts | ||
|
|
||
|
|
||
| def test_account_plans_list(api, account_plan): | ||
| account_plans = api.account_plans.list() | ||
| assert len(account_plans) >= 1 | ||
|
|
||
|
|
||
| def test_account_plan_can_be_created(api, account_plan, account_plans_params): | ||
| asserts.assert_resource(account_plan) | ||
| asserts.assert_resource_params(account_plan, account_plans_params) | ||
|
|
||
|
|
||
| def test_account_plan_update(account_plan, account_plans_update_params): | ||
| updated_account_plan = account_plan.update(params=account_plans_update_params) | ||
| asserts.assert_resource(updated_account_plan) | ||
| asserts.assert_resource_params(updated_account_plan, account_plans_update_params) | ||
|
|
||
|
|
||
| def test_account_plan_can_be_read(api, account_plan, account_plans_params): | ||
| read = api.account_plans.read(account_plan.entity_id) | ||
| asserts.assert_resource(read) | ||
| asserts.assert_resource_params(read, account_plans_params) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,23 @@ | ||
| from tests.integration import asserts | ||
| from .asserts import assert_resource, assert_resource_params | ||
|
|
||
|
|
||
| def test_active_docs_can_be_created(active_doc, active_docs_params): | ||
| asserts.assert_resource(active_doc) | ||
| asserts.assert_resource_params(active_doc, active_docs_params) | ||
|
|
||
|
|
||
| def test_active_docs_fetch(active_doc): | ||
| ac = active_doc.client.fetch(int(active_doc['id'])) | ||
| assert ac | ||
| assert ac['id'] == active_doc['id'] | ||
|
|
||
|
|
||
| def test_active_docs_list(api, active_doc): | ||
| active_docs = api.active_docs.list() | ||
| assert len(active_docs) >= 1 | ||
|
|
||
|
|
||
| def test_active_docs_update(active_doc, active_docs_update_params): | ||
| updated_active_doc = active_doc.update(params=active_docs_update_params) | ||
| asserts.assert_resource(updated_active_doc) | ||
| asserts.assert_resource_params(updated_active_doc, active_docs_update_params) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| from tests.integration import asserts | ||
| from tests.integration.conftest import backend | ||
|
|
||
|
|
||
| def test_backend_usage_can_be_created(backend_usage, backend_usage_params): | ||
| asserts.assert_resource(backend_usage) | ||
| asserts.assert_resource_params(backend_usage, backend_usage_params) | ||
|
|
||
|
|
||
| def test_backend_usages_list(api, backend_usage, backend): | ||
| assert len(backend.usages()) >= 1 | ||
|
|
||
|
|
||
| def test_backend_usage_update(backend_usage, backend, backend_usage_update_params): | ||
| updated_backend_usage = backend_usage.update(backend_usage_update_params) | ||
| asserts.assert_resource(updated_backend_usage) | ||
| asserts.assert_resource_params(updated_backend_usage, backend_usage_update_params) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.