"""This modules holds the test cases for the views of the ``themes`` app"""

from django.core.urlresolvers import reverse

from mtp.apps.api.tests.test_cases import MTPAPITestCase


class ThemeDetailAPITestCase(MTPAPITestCase):
    """Test cases for the ``theme-detail`` api endpoint"""

    def test_theme_detail_route_should_work(self):
        """Test that the ``theme-detail`` route work"""

        response_code, __ = self.get_api_response(
            reverse('api:theme-detail', kwargs={
                'theme_uuid': self.theme.pk
            }),
            'get',
            {}
        )

        # The route work
        self.assertEqual(
            response_code,
            200
        )

        # TODO: Test the content of the response

    def test_theme_detail_with_training_should_work(self):
        """Test that the ``theme-detail`` with a provided training route work"""

        response_code, __ = self.get_api_response(
            reverse('api:theme-detail', kwargs={
                'training_uuid': self.training.pk
            }),
            'get',
            {}
        )

        # The route work
        self.assertEqual(
            response_code,
            200
        )
