Пример #1
0
def test_sales_granularity_total():
    res = Sales().get_order_metrics(interval, Granularity.TOTAL, granularityTimeZone='US/Central')
    assert res.payload[0].get('unitCount') == 2
Пример #2
0
def test_sales_granularity_day_by_asin():
    res = Sales().get_order_metrics(interval, Granularity.DAY, granularityTimeZone='US/Central', asin='B008OLKVEW')
    assert res.payload[0].get('unitCount') == 1
def test_sales_granularity_year():
    s = Sales().get_order_metrics(interval,
                                  Granularity.YEAR,
                                  granularityTimeZone='US/Central')
    print(s)
def test_sales_granularity_month():
    s = Sales().get_order_metrics(interval,
                                  Granularity.MONTH,
                                  granularityTimeZone='US/Central')
    print(s)
def test_sales_granularity_week():
    s = Sales().get_order_metrics(interval,
                                  Granularity.WEEK,
                                  granularityTimeZone='US/Central')
    print(s)
def test_sales_granularity_day():
    s = Sales(marketplace=Marketplaces.DE).get_order_metrics(
        interval, Granularity.DAY, granularityTimeZone='US/Central')
    print(s)
def test_sales_granularity_hour():
    s = Sales().get_order_metrics(interval, Granularity.HOUR)
    print(s)