mirror of
https://github.com/pezkuwichain/pezkuwi-subquery.git
synced 2026-04-22 21:48:01 +00:00
0812cf9e7a
- pezkuwi.yaml: Relay chain staking indexer (rewards, slashes, pools, transfers, era info) - pezkuwi-assethub.yaml: Asset Hub indexer (NominationPools, asset transfers) - GraphQL schema for staking data entities - Handler mappings from Nova SubQuery base
32 lines
1023 B
Python
32 lines
1023 B
Python
import json
|
|
import pytest
|
|
import os
|
|
from subquery_cli import use_subquery_cli
|
|
|
|
subquery_cli_version = '0.2.4'
|
|
token = os.environ['SUBQUERY_TOKEN']
|
|
project_key = os.environ['PROJECT_KEY']
|
|
|
|
|
|
@pytest.fixture
|
|
def get_project_data():
|
|
project_data = json.loads(
|
|
use_subquery_cli(
|
|
subquery_cli_version, '--token', token, 'deployment', 'list', '-o', 'json', '--org', 'nova-wallet', '--key', project_key
|
|
))
|
|
stage_project = next(
|
|
item for item in project_data if item["type"] == "stage")
|
|
return stage_project
|
|
|
|
|
|
def test_project_status(get_project_data):
|
|
assert get_project_data['status'] == 'running'
|
|
|
|
|
|
def test_sync_status_test(get_project_data):
|
|
sync_status = use_subquery_cli(
|
|
subquery_cli_version, '--token', token, 'deployment', 'sync-status', '--id', str(get_project_data['id']), '--key', project_key, '--org', 'nova-wallet')
|
|
status = sync_status.split("percent: ")[1:]
|
|
assertion_value = status[0].split('%')[0:][0]
|
|
assert assertion_value == '100.00'
|