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

"""
pqapiv2

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 pqapiv2.api_helper import APIHelper


class ProgramControllerTests(ControllerTestBase):

    @classmethod
    def setUpClass(cls):
        super(ProgramControllerTests, cls).setUpClass()
        cls.controller = cls.client.program
        cls.response_catcher = cls.controller.http_call_back

    # Retrieve a list of all programs that supports filtering, sorting, and pagination through existing mechanisms.
    def test_list_programs(self):

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

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

    # Retrieve a single program configuration
    def test_retrieve_program(self):
        # Parameters for the API call
        prog_token = 'prog-4525ab9c-5b22-4e30-028a-45901a10aa0c'

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

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

    # Retrieve a single program agreement
    def test_retrieve_program_agreement(self):
        # Parameters for the API call
        prog_token = 'prog-4525ab9c-5b22-4e30-028a-45901a10aa0c'
        agmt_token = 'agmt-45901a10-5b22-4e30-028a-45901a10baa9'

        # Perform the API call through the SDK function
        self.controller.retrieve_program_agreement(prog_token, agmt_token)

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

