-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: alexstroke <111361420+astrokov7@users.noreply.github.com>
- Loading branch information
1 parent
cc7461c
commit 761574d
Showing
8 changed files
with
65 additions
and
23 deletions.
There are no files selected for viewing
This file contains 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 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 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,25 +1,30 @@ | ||
import allure | ||
import time | ||
import pytest | ||
|
||
from tests import client | ||
|
||
|
||
@pytest.fixture(scope="function", autouse=True) | ||
def story_account_register_account(): | ||
allure.dynamic.story("Account queries assets") | ||
def story_account_queries_accounts(): | ||
allure.dynamic.story("Account queries accounts") | ||
allure.dynamic.label("permission", "no_permission_required") | ||
|
||
@pytest.mark.xfail(reason="TO DO") | ||
@allure.label("sdk_test_id", "query_all_assets_owned_by_account") | ||
def test_query_all_assets_owned_by_account( | ||
GIVEN_registered_account_with_assets): | ||
|
||
@allure.label("sdk_test_id", "query_all_accounts") | ||
def test_query_all_accounts(): | ||
with allure.step('WHEN client queries all accounts'): | ||
all_accounts = client.query_all_accounts() | ||
with allure.step('THEN there should be some accounts present'): | ||
assert len(all_accounts) > 0, "No accounts found in the system" | ||
|
||
|
||
@allure.label("sdk_test_id", "query_all_accounts_in_domain") | ||
def test_query_all_accounts_in_domain( | ||
GIVEN_registered_domain_with_registered_accounts): | ||
with allure.step( | ||
f'WHEN client queries all assets owned by account "{GIVEN_registered_account_with_assets}"'): | ||
time.sleep(3) | ||
assets_owned_by_account = client.query_all_assets_owned_by_account(GIVEN_registered_account_with_assets) | ||
f'WHEN client queries all accounts in domain "{GIVEN_registered_domain_with_registered_accounts}"'): | ||
accounts_in_domain = client.query_all_accounts_in_domain(GIVEN_registered_domain_with_registered_accounts) | ||
with allure.step( | ||
f'THEN the response should be a non-empty list of assets owned by account "{GIVEN_registered_account_with_assets}"'): | ||
assert isinstance(assets_owned_by_account, list) and assets_owned_by_account, \ | ||
f"Expected a non-empty list of assets owned by account {GIVEN_registered_account_with_assets}, got {assets_owned_by_account}" | ||
|
||
|
||
f'THEN the response should be a non-empty list of accounts in domain "{GIVEN_registered_domain_with_registered_accounts}"'): | ||
assert isinstance(accounts_in_domain, list) and accounts_in_domain, \ | ||
f"Expected a non-empty list of accounts in the domain {GIVEN_registered_domain_with_registered_accounts}, got {accounts_in_domain}" |
This file contains 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,16 @@ | ||
import allure | ||
import pytest | ||
|
||
from tests import client | ||
|
||
@pytest.fixture(scope="function", autouse=True) | ||
def story_account_queries_domains(): | ||
allure.dynamic.story("Account queries domains") | ||
allure.dynamic.label("permission", "no_permission_required") | ||
|
||
@allure.label("sdk_test_id", "query_all_domains") | ||
def test_query_all_domains(): | ||
with allure.step('WHEN client queries all domains'): | ||
all_domains = client.query_all_domains() | ||
with allure.step('THEN there should be some accounts present'): | ||
assert len(all_domains) > 0, "No domains found in the system" |
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.