def test_data_monthly_endpoint_price_path(client): response = client.get('/cbeci/api/data/monthly/0.05') # type: Response assert response_is_successful(response) assert response_has_data_list(response) assert response_data_item_has_keys( response, ['month', 'timestamp', 'value', 'cumulative_value'])
def test_data_endpoint_price_path(client): response = client.get('/cbeci/api/data/0.05') # type: Response assert response_is_successful(response) assert response_has_data_list(response) assert response_data_item_has_keys(response, [ 'date', 'guess_consumption', 'max_consumption', 'min_consumption', 'timestamp' ])
def test_charts_endpoint_mining_map_countries(client): response = client.get( '/cbeci/api/charts/mining_map_countries') # type: Response assert response_is_successful(response) assert response_has_data_list(response) assert response_data_item_has_keys(response, ['code', 'name', 'x', 'y'])
def test_charts_endpoint_mining_equipment_efficiency(client): response = client.get( '/cbeci/api/charts/mining_equipment_efficiency') # type: Response assert response_is_successful(response) assert response_has_data_list(response) assert response_data_item_has_keys(response, ['name', 'x', 'y'])
def test_charts_endpoint_profitability_threshold(client): response = client.get( '/cbeci/api/charts/profitability_threshold') # type: Response assert response_is_successful(response) assert response_has_data_list(response) assert response_data_item_has_keys(response, ['x', 'y'])