# -*- coding: utf-8 -*-

"""
coingeckoapiv3

This file was automatically generated by APIMATIC v3.0 (
 https://www.apimatic.io ).
"""

import json
import dateutil.parser

from tests.controllers.controller_test_base import ControllerTestBase
from tests.test_helper import TestHelper
from tests.http_response_catcher import HttpResponseCatcher
from coingeckoapiv3.api_helper import APIHelper
from coingeckoapiv3.controllers.exchanges_controller import ExchangesController


class ExchangesControllerTests(ControllerTestBase):

    @classmethod
    def setUpClass(cls):
        super(ExchangesControllerTests, cls).setUpClass()
        cls.response_catcher = HttpResponseCatcher()
        cls.controller = ExchangesController(cls.config, cls.response_catcher)

    # List all exchanges
    def test_listallexchanges(self):
        # Parameters for the API call
        per_page = None
        page = None

        # Perform the API call through the SDK function
        self.controller.listallexchanges(per_page, page)

        # Test response code
        self.assertEquals(self.response_catcher.response.status_code, 200)

    # Use this to obtain all the markets' id in order to make API calls
    def test_listallsupportedmarketsidandname_nopaginationrequired(self):

        # Perform the API call through the SDK function
        self.controller.listallsupportedmarketsidandname_nopaginationrequired()

        # Test response code
        self.assertEquals(self.response_catcher.response.status_code, 200)

