import unittest

import validate_test_instance


class ValidateTestInstanceTest(unittest.TestCase):
    def test_missing_controlled_projects_are_warn_for_daily_clone(self):
        results = validate_test_instance.controlled_project_check([])

        self.assertEqual("WARN", results.status)
        self.assertIn("optional", results.detail)

    def test_composer_validation_is_skipped_when_disabled(self):
        result = validate_test_instance.check_composer(None)

        self.assertEqual("WARN", result.status)
        self.assertIn("skipped", result.detail)


if __name__ == "__main__":
    unittest.main()
