# coding: utf-8

"""
Accounting API


The version of the OpenAPI document: 8.3.9
Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.
"""  # noqa: E501


import unittest
from urllib.parse import urljoin

import requests_mock

from accounting_sh.accounting import Accounting
from accounting_sh.api.statistics_api import StatisticsApi


class TestStatisticsApi(unittest.TestCase):
    """StatisticsApi unit test stubs"""

    """
    def setUp(self) -> None:
        accounting = Accounting("fake-token")
        self.api = accounting.statistics_api

    def tearDown(self) -> None:
        pass
    """

    @requests_mock.Mocker()
    def test_summary_statistics_period(self, m) -> None:
        """Test case for summary_statistics_period

        Company's summary statistics
        """
        path = urljoin(
            "https://api.accounting.sh", "/companies/{uuid}/statistics/summary"
        )
        path = path.replace("{" + "uuid" + "}", "uuid_example")
        m.request("GET", path)
        accounting = Accounting("fake-token")
        assert (
            accounting.statistics_api.summary_statistics_period(
                "uuid_example",
                "2013-10-20",
                "2013-10-20",
            )
            is not None
        )


if __name__ == "__main__":
    unittest.main()
