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

"""
cookiesapi

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 cookiesapi.api_helper import APIHelper
from cookiesapi.controllers.stores_controller import StoresController


class StoresControllerTests(ControllerTestBase):

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

    # Fetch a generic list of all stores.
    def test_list_stores(self):
        # Parameters for the API call
        brand = None

        # Perform the API call through the SDK function
        result = self.controller.list_stores(brand)

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

    # List stores, filtered by brand COOKIES.
    def test_list_stores_cookies(self):
        # Parameters for the API call
        brand = 'COOKIES'

        # Perform the API call through the SDK function
        result = self.controller.list_stores(brand)

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

    # List stores, filtered by brand LEMONNADE.
    def test_list_stores_lemonnade(self):
        # Parameters for the API call
        brand = 'LEMONNADE'

        # Perform the API call through the SDK function
        result = self.controller.list_stores(brand)

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

