"""This module holds managers tests for ``assessments`` app."""

from mtp.apps.assessments.tests.test_cases import MTPComplexAssessmentTestCase

from ..models import CompetencyTree


class CompetencyTreeManagerTestCase(MTPComplexAssessmentTestCase):
    """Test the ``CompetencyTreeManager``."""

    def test_get_for_session(self):
        """Test the return value of ``get_for_session`` method."""

        self.assertEqual(
            CompetencyTree.objects.get_for_session(self.training_session),
            self.competency_tree
        )

    def test_get_for_job_profile(self):
        """Test the return value of ``get_for_job_profile`` method."""

        self.assertEqual(
            CompetencyTree.objects.get_for_job_profile(self.job_profile),
            self.competency_tree
        )
