from __future__ import absolute_import, division, print_function

import stripe

import pytest


pytestmark = pytest.mark.asyncio

TEST_RESOURCE_ID = "activity.summary.1"


class TestReportType(object):
    async def test_is_listable(self, request_mock):
        resources = await stripe.reporting.ReportType.list()
        request_mock.assert_requested("get", "/v1/reporting/report_types")
        assert isinstance(resources.data, list)
        assert isinstance(resources.data[0], stripe.reporting.ReportType)

    async def test_is_retrievable(self, request_mock):
        resource = await stripe.reporting.ReportType.retrieve(TEST_RESOURCE_ID)
        request_mock.assert_requested(
            "get", "/v1/reporting/report_types/%s" % TEST_RESOURCE_ID
        )
        assert isinstance(resource, stripe.reporting.ReportType)

from __future__ import absolute_import, division, print_function

import stripe

import pytest


pytestmark = pytest.mark.asyncio

TEST_RESOURCE_ID = "activity.summary.1"


class TestReportType(object):
    async def test_is_listable(self, request_mock):
        resources = await stripe.reporting.ReportType.list()
        request_mock.assert_requested("get", "/v1/reporting/report_types")
        assert isinstance(resources.data, list)
        assert isinstance(resources.data[0], stripe.reporting.ReportType)

    async def test_is_retrievable(self, request_mock):
        resource = await stripe.reporting.ReportType.retrieve(TEST_RESOURCE_ID)
        request_mock.assert_requested(
            "get", "/v1/reporting/report_types/%s" % TEST_RESOURCE_ID
        )
        assert isinstance(resource, stripe.reporting.ReportType)
