def setUp(self):
     self.administrator = AdministratorDataRepository.get_valid_administrator(
     )
     self.id_administrator = str(uuid.uuid4())
     self.id_state = str(uuid.uuid4())
     self.id_person = str(uuid.uuid4())
     self.id_credential = str(uuid.uuid4())
    def test_true_validate_add_administrator_request():
        """
        Tests if the method validates a valid administrator request
        """

        AdministratorView.validate_add_administrator_request(
            AdministratorDataRepository.get_valid_administrator())
    def test_missing_email_validate_add_administrator_request(self):
        """
        Tests if the method detects a administrator request with a missing email field
        """

        self.assertRaises(
            ValidationError,
            AdministratorView.validate_add_administrator_request,
            AdministratorDataRepository.get_missing_email_administrator())
    def test_invalid_birth_date_validate_add_administrator_request(self):
        """
        Tests if the method detects a administrator request with a birth date after current date
        """

        self.assertRaises(
            ValidationError,
            AdministratorView.validate_add_administrator_request,
            AdministratorDataRepository.get_invalid_birth_date_administrator())
    def test_invalid_gender_validate_add_administrator_request(self):
        """
        Tests if the method detects a administrator request with a gender type different from "m" or "f"
        """

        self.assertRaises(
            ValidationError,
            AdministratorView.validate_add_administrator_request,
            AdministratorDataRepository.get_invalid_gender_administrator())