예제 #1
0
    def test2(self):
        self.assertEqual(ruc.calculateDV("61302-14-123411"), "22")
        self.assertEqual(ruc.calculateDV("1102-85-117211"), "95")
        self.assertEqual(ruc.calculateDV("2486589-1-816994"), "62")
        self.assertEqual(ruc.calculateDV("1830234-1-710357"), "82")

        self.assertEqual(ruc.calculateDV("41369-85-283456"), "73")
예제 #2
0
    def test2(self):
        self.assertEqual(ruc.calculateDV('61302-14-123411'), '22')
        self.assertEqual(ruc.calculateDV('1102-85-117211'), '95')
        self.assertEqual(ruc.calculateDV('2486589-1-816994'), '62')
        self.assertEqual(ruc.calculateDV('1830234-1-710357'), '82')

        self.assertEqual(ruc.calculateDV('41369-85-283456'), '73')
예제 #3
0
    def test2(self):
        self.assertEqual(ruc.calculateDV('61302-14-123411'),'22')
        self.assertEqual(ruc.calculateDV('1102-85-117211'),'95')
        self.assertEqual(ruc.calculateDV('2486589-1-816994'),'62')
        self.assertEqual(ruc.calculateDV('1830234-1-710357'),'82')

        self.assertEqual(ruc.calculateDV('41369-85-283456'),'73')
예제 #4
0
 def check_vat_pa(self, vat):
     vat_split_dv = vat.split('DV')
     vat = vat_split_dv[0]
     ruc_vat.calculateDV(vat)
     if self.__check_vat_pa_re1.match(vat) or self.__check_vat_pa_re2.\
             match(vat) or self.__check_vat_pa_re3.match(vat) or self.\
             __check_vat_pa_re4.match(vat) or self.__check_vat_pa_re5.\
             match(vat):
         if len(vat_split_dv) == 2:
             return ruc_vat.calculateDV(vat) == vat_split_dv[-1]
         return True
     return False
예제 #5
0
 def test_I(self):
     "Formato para Cédulas (Personas Naturales)"
     # Panam
     self.assertEqual(ruc.calculateDV("8-442-445"), "08")
     self.assertEqual(ruc.calculateDV("PE-10-442"), "50")
     self.assertEqual(ruc.calculateDV("N-45-832"), "58")
     self.assertEqual(ruc.calculateDV("E-12-342"), "10")
     self.assertEqual(ruc.calculateDV("1AV-432-658"), "96")
     self.assertEqual(ruc.calculateDV("4PI-234-123"), "96")
예제 #6
0
 def test_I(self):
     "Formato para Cédulas (Personas Naturales)"
     # Panam
     self.assertEqual(ruc.calculateDV('8-442-445'), '08')
     self.assertEqual(ruc.calculateDV('PE-10-442'), '50')
     self.assertEqual(ruc.calculateDV('N-45-832'), '58')
     self.assertEqual(ruc.calculateDV('E-12-342'), '10')
     self.assertEqual(ruc.calculateDV('1AV-432-658'), '96')
     self.assertEqual(ruc.calculateDV('4PI-234-123'), '96')
예제 #7
0
 def test_I(self):
     "Formato para Cédulas (Personas Naturales)"
     # Panam
     self.assertEqual(ruc.calculateDV('8-442-445'), '08')
     self.assertEqual(ruc.calculateDV('PE-10-442'),'50')
     self.assertEqual(ruc.calculateDV('N-45-832'),'58')
     self.assertEqual(ruc.calculateDV('E-12-342'),'10')
     self.assertEqual(ruc.calculateDV('1-AV-432-658'),'31')
     self.assertEqual(ruc.calculateDV('4-PI-234-123'),'31')
예제 #8
0
 def test_IV(self):
     "Formato para Jurídico NT"
     self.assertEqual(ruc.calculateDV(""), "")
     self.assertEqual(ruc.calculateDV(""), "")
예제 #9
0
 def test_errors(self):
     self.assertEqual(ruc.calculateDV(''), '')
     self.assertEqual(ruc.calculateDV('E'), '')
예제 #10
0
 def test_IV(self):
     "Formato para Jurídico NT"
     self.assertEqual(ruc.calculateDV(''), '')
     self.assertEqual(ruc.calculateDV(''), '')
예제 #11
0
 def test_III(self):
     "Formato para RUC (Persona Jurídica)"
     self.assertEqual(ruc.calculateDV('11947-1027-0229562'), '71')
     self.assertEqual(ruc.calculateDV('11947-1-0229562'), '42')
예제 #12
0
 def test_II(self):
     "Formato para Pasaportes (Persona Natural Extranjera)"
     self.assertEqual(ruc.calculateDV('PAS1311723564'), '')
예제 #13
0
 def test3(self):
     self.assertEqual(ruc.calculateDV('64296-75-357434'), '00')
     self.assertEqual(ruc.calculateDV('203141-1-17214'), '60')
     self.assertEqual(ruc.calculateDV('1075137-1-553125'), '18')
예제 #14
0
 def test_errors(self):
     self.assertEqual(ruc.calculateDV(""), "")
     self.assertEqual(ruc.calculateDV("E"), "")
예제 #15
0
 def test3(self):
     self.assertEqual(ruc.calculateDV('64296-75-357434'),'00')
     self.assertEqual(ruc.calculateDV('203141-1-17214'),'60')
     self.assertEqual(ruc.calculateDV('1075137-1-553125'),'18')
예제 #16
0
 def test_III(self):
     "Formato para RUC (Persona Jurídica)"
     self.assertEqual(ruc.calculateDV("11947-1027-0229562"), "71")
     self.assertEqual(ruc.calculateDV("11947-1-0229562"), "42")
예제 #17
0
 def test_II(self):
     "Formato para Pasaportes (Persona Natural Extranjera)"
     self.assertEqual(ruc.calculateDV("PAS1311723564"), "")
예제 #18
0
 def test3(self):
     self.assertEqual(ruc.calculateDV("64296-75-357434"), "00")
     self.assertEqual(ruc.calculateDV("203141-1-17214"), "60")
     self.assertEqual(ruc.calculateDV("1075137-1-553125"), "18")
예제 #19
0
 def test_III(self):
     "Formato para RUC (Persona Jurídica)"
     self.assertEqual(ruc.calculateDV('11947-1027-0229562'),'71')
     self.assertEqual(ruc.calculateDV('11947-1-0229562'),'42')
예제 #20
0
 def test_errors(self):
     self.assertEqual(ruc.calculateDV(''),'')
     self.assertEqual(ruc.calculateDV('E'),'')