コード例 #1
0
 def test_AM_FR_01_I3_nombres_apellido(self):
     ar = AccessRequest(id_document="12345678Z", full_name="Beatriz x Benitez",
                        access_type="Guest", email_address="*****@*****.**", validity=3)
コード例 #2
0
 def test_AM_FR_01_I3_espacio_detras(self):
     with self.assertRaises(AccessManagementException) as AME:
         AccessRequest(id_document="12345678Z", full_name="Beatriz Benitez ",
                       access_type="Guest", email_address="*****@*****.**", validity=3)
     self.assertEqual(AME.exception.message, AccessRequest.MENSAJE_EXCEPCION_NAME)
コード例 #3
0
 def test_AM_FR_01_O2_access_type(self):
     with self.assertRaises(AccessManagementException) as AME:
         ar = AccessRequest(id_document="12345678Z", full_name="Beatriz Benitez", access_type="Other", email_address="*****@*****.**", validity=3)
     self.assertEqual(AME.exception.message, AccessRequest.MENSAJE_EXCEPCION_ACCESS_TYPE)
コード例 #4
0
 def test_AM_FR_01_I3_nombre_apellido(self):
     ar = AccessRequest(id_document="12345678Z", full_name="Beatriz Benitez",
                        access_type="Guest", email_address="*****@*****.**", validity=3)
     self.assertEqual(ar.access_code, "299350376deadf07044aaa5035f93a6f")
コード例 #5
0
 def test_AM_FR_01_I5_validity_resident_2(self):
     with self.assertRaises(AccessManagementException) as AME:
         AccessRequest(id_document="12345678Z", full_name="Beatriz Benitez",
                       access_type="Resident", email_address="*****@*****.**", validity=2)
     self.assertEqual(AME.exception.message, AccessRequest.MENSAJE_EXCEPCION_VALIDITY)
コード例 #6
0
 def test_AM_FR_01_O1_invalido(self):
     ar = AccessRequest(id_document="12345678Z", full_name="Beatriz Benitez",
                        access_type="Guest", email_address="*****@*****.**", validity=3)
     self.assertNotEqual(ar.access_code, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
コード例 #7
0
 def test_AM_FR_01_I5_validity_resident_0(self):
     ar = AccessRequest(id_document="12345678Z", full_name="Beatriz Benitez",
                        access_type="Resident", email_address="*****@*****.**", validity=0)
     self.assertEqual(ar.access_code, "eeadab980b4ae41412aed7a991750fab")
コード例 #8
0
 def test_AM_FR_01_I5_validity_guest_15(self):
     ar = AccessRequest(id_document="12345678Z", full_name="Beatriz Benitez",
                        access_type="Guest", email_address="*****@*****.**", validity=15)
     self.assertEqual(ar.access_code, "e5148debcfde73b070d3bc94849a0834")
コード例 #9
0
 def test_AM_FR_01_I5_validity_guest_14(self):
     ar = AccessRequest(id_document="12345678Z", full_name="Beatriz Benitez",
                        access_type="Guest", email_address="*****@*****.**", validity=14)
     self.assertEqual(ar.access_code, "2c3332d44cc5ef4c63af11fefd9b4f18")
コード例 #10
0
 def test_AM_FR_01_I5_validity_guest_2(self):
     ar = AccessRequest(id_document="12345678Z", full_name="Beatriz Benitez",
                        access_type="Guest", email_address="*****@*****.**", validity=2)
     self.assertEqual(ar.access_code, "4bbd21090fb63e6810eb67adc3fcdcee")
コード例 #11
0
 def test_AM_FR_01_I4_email_sin_company(self):
     with self.assertRaises(AccessManagementException) as AME:
         AccessRequest(id_document="12345678Z", full_name="Beatriz Benitez",
                       access_type="Guest", email_address="[email protected]", validity=3)
     self.assertEqual(AME.exception.message, AccessRequest.MENSAJE_EXCEPCION_EMAIL)