def test_join_fields_for_orden(orden): joined = ( '||40072|TAMIZI|||CR1564969083|90646|1.20|1|40||646180110400000007|' '|40|Ricardo Sanchez|072691004495711499|ND||||||Prueba||||||5273144|' '|T||3|0|||' ) assert join_fields(orden, ORDEN_FIELDNAMES) == joined
def test_compute_signature(client, orden): firma = ( 'QSESEqJTcn8hhK2QaA/z9VnIZDktwgPS1VWJxOooZt3vNEi2IKrIoPI+/O/SDo/lZAMAm' 'xg6De7Sg/OALjibLPpLlONd0VLIa81xsF0FmP+22mT9MtPgf3/kGuZvgSKpzzzNbhxEM+' '/j4sgWw9ucbD0Oh+ajsN1MgKjIBaTC7SI=') sig = compute_signature(client.pkey, join_fields(orden, ORDEN_FIELDNAMES)) assert sig == firma
def test_compute_signature(client, soap_orden): firma = ( 'wheaue7DpL7ro+9GAR4pJAscGTT+UPD/aXiAchkQI/61QIJBcAzhecW7BG9bAVTG5fI8g' 'Ah6CdTEQn9q1O7VClOLdRqjNVluOLtDhm4iq5R7ew9+tjjHMJAv7JtSX7W9v55NtR9/jZ' '7RhSUbvEvS06Tfxq5CX+Ct7ySDOOiaOpM=') sig = compute_signature(client._pkey, join_fields(soap_orden)) assert sig == firma
def test_compute_signature(client, orden): firma = ( 'KDNKDVVuyNt9oTXPAlofGXGH5L5IH9PAzOsx0JZFtmGlU+10QRf2RHSg0OVCnYYpu5sC3' 'DJ6vlXuYM40+uNw0tMc0y8Dv26uO8Vv2GhOhMqaGk72LwgwgmqVg17xzjgGbJHzAzMav3' 'fx4/3No+mSnf7vxpe4ePf6yK1yU5U28L4=' ) sig = compute_signature(client.pkey, join_fields(orden, ORDEN_FIELDNAMES)) assert sig == firma
def test_compute_signature(client, orden): firma = ( 'nuW3v3gV5GqQCGiIfUGOrENSZK+bYRR3RZ8xT0wNm+p+XowkogURPEuFRk2SwkjNn6HUN' 'XP3OkHFe92s0ViyLad7nN5n8pIvmGdOLopBtXvYBNhJmuCw2D32oGDWm7fKydW17NR9BY' 'xJFdqSJzMGq4dquFI3ZuG6YfVHo4NYE5A=' ) sig = compute_signature(client.pkey, join_fields(orden, ORDEN_FIELDNAMES)) assert sig == firma
def test_join_fields_for_cuenta(cuenta): cuenta.cuenta = '646180157099999993' joined = '||TAMIZI|646180157099999993|SAHE800416HDFABC01||' assert join_fields(cuenta, CUENTA_FIELDNAMES) == joined
def test_join_fields(soap_orden): joined = ( b'||40072|TAMIZI|||CR1564969083|90646|1.20|1|||||40|Ricardo Sanchez|07' b'2691004495711499|ND||||||Prueba||||||5273144||T||3|1|||') assert join_fields(soap_orden) == joined