Пример #1
0
def test_batched_queries_different_format():
    batch = Batch()

    batch.get('projects/all')
    batch.get('social_volume_projects')
    batch.get("{}/{}".format('social_volume', 'ethereum'),
              from_date=month_ago(),
              to_date=params['to_date'],
              interval=params['interval'],
              social_volume_type='PROFESSIONAL_TRADERS_CHAT_OVERVIEW')
    batch.get('topic_search',
              source='TELEGRAM',
              search_text='btc',
              from_date=month_ago(),
              to_date=params['to_date'],
              interval=params['interval'])

    result = batch.execute()
    for df in result:
        assert len(df.index) >= 1
Пример #2
0
import san
from san import Batch, sanbase_graphql, sanbase_graphql_helper, available_metrics
from san.tests.utils import two_days_ago, four_days_ago, month_ago
from nose.plugins.attrib import attr

params = {
    'project_slug': 'santiment',
    'from_date': month_ago(),
    'to_date': two_days_ago(),
    'interval': '1d',
    'address': '0x1f3df0b8390bb8e9e322972c5e75583e87608ec2'
}

# Metrics, which are made with _create_query_string, excluding the ones
# using ETHEREUM
METRICS_EQUAL_FORMAT = [
    'daily_active_addresses',
    'burn_rate',
    'transaction_volume',
    'token_age_consumed',
    'average_token_age_consumed_in_days',
    'github_activity',
    'dev_activity',
    'network_growth',
    'prices',
    'token_velocity',
    'token_circulation',
    'realized_value',
    'mvrv_ratio',
    'nvt_ratio',
    'daily_active_deposits',