def test_valid_mrz_5(self):
        """
        Invalid MRZ, every element too short
        """
        input = ['ABCD01A2', '90010', '20010']
        mrtd = MRTD(input)

        with self.assertRaises(MRZException) as context:
            mrtd.check_mrz()

        self.assertTrue("The mrz length is invalid" in context.exception)
    def test_valid_mrz_2(self):
        """
        Invalid MRZ, document number too long
        """
        input = ['ABCD01A23<', '900101', '200101']
        mrtd = MRTD(input)

        with self.assertRaises(MRZException) as context:
            mrtd.check_mrz()

        self.assertTrue("The mrz length is invalid" in context.exception)
    def test_valid_mrz_4(self):
        """
        Invalid MRZ, experation date too long
        """
        input = ['ABCD01A23', '900101', '200101<']
        mrtd = MRTD(input)

        with self.assertRaises(MRZException) as context:
            mrtd.check_mrz()

        self.assertTrue("The mrz length is invalid" in context.exception)
    def test_valid_mrz_1(self):
        """
        Valid MRZ
        """
        input = ['ABCD01A23', '900101', '200101']
        mrtd = MRTD(input)

        valid = mrtd.check_mrz()

        self.assertTrue(valid)