diff --git a/tests/cassettes/test_wscdc/test_analizar_errores.yaml b/tests/cassettes/test_wscdc/test_analizar_errores.yaml new file mode 100644 index 000000000..004e7e69a --- /dev/null +++ b/tests/cassettes/test_wscdc/test_analizar_errores.yaml @@ -0,0 +1,422 @@ +interactions: +- request: + body: null + headers: + accept-encoding: + - gzip, deflate + user-agent: + - Mozilla/5.0 (Windows NT 6.1; Win64; x64) + method: GET + uri: https://wsaahomo.afip.gov.ar/ws/services/LoginCms?wsdl + response: + body: + string: "\n\n\n \n + \ \n \n + \ \n \n \n \n \n \n + \ \n \n \n + \ \n \n + \ \n \n \n \n \n \n + \ \n \n \n + \ \n \n\n \n\n + \ \n\n \n\n + \ \n\n \n\n \n\n \n\n \n\n + \ \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n + \ \n\n + \ \n\n \n\n \n\n \n\n + \ \n\n \n\n + \ \n\n + \ \n\n \n\n + \ \n\n \n\n \n\n \n\n + \ \n\n \n\n + \ \n\n \n\n \n\n \n\n + \ \n\n \n\n \n\n \n\n \n\n + \ \n\n\n" + headers: + Content-Type: + - text/xml;charset=utf-8 + Date: + - Mon, 26 Jul 2021 14:59:13 GMT + Set-Cookie: + - TS01b14f84=0145b27a975d415aaac17d3068ca5f383dd2c8eda659fdc932b0f402493d3152c4571c0d12; + Path=/ + Transfer-Encoding: + - chunked + status: + code: 200 + message: OK +- request: + body: "\n\n\n + \ \n MIIG+QYJKoZIhvcNAQcCoIIG6jCCBuYCAQExDzANBglghkgBZQMEAgEFADCCASAG\nCSqGSIb3DQEHAaCCAREEggENPD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0i\nVVRGLTgiPz48bG9naW5UaWNrZXRSZXF1ZXN0IHZlcnNpb249IjEuMCI+PGhlYWRl\ncj48dW5pcXVlSWQ+MTYyNzI5MTc0OTwvdW5pcXVlSWQ+PGdlbmVyYXRpb25UaW1l\nPjIwMjEtMDctMjZUMDk6NTk6MDk8L2dlbmVyYXRpb25UaW1lPjx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+V\nt1VoD8dNIl3MAZSoxg==\n\n\n\n" + headers: + accept-encoding: + - gzip, deflate + content-length: + - '2722' + content-type: + - text/xml; charset="UTF-8" + soapaction: + - '"None"' + user-agent: + - Mozilla/5.0 (Windows NT 6.1; Win64; x64) + method: POST + uri: https://wsaahomo.afip.gov.ar/ws/services/LoginCms + response: + body: + string: "<?xml + version="1.0" encoding="UTF-8" standalone="yes"?>\n<loginTicketResponse + version="1.0">\n <header>\n <source>CN=wsaahomo, + O=AFIP, C=AR, SERIALNUMBER=CUIT 33693450239</source>\n <destination>SERIALNUMBER=CUIT + 20267565393, CN=reingart2021</destination>\n <uniqueId>2734311999</uniqueId>\n + \ <generationTime>2021-07-26T11:59:14.497-03:00</generationTime>\n + \ <expirationTime>2021-07-26T23:59:14.497-03:00</expirationTime>\n + \ </header>\n <credentials>\n <token>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9InllcyI/Pgo8c3NvIHZlcnNpb249IjIuMCI+CiAgICA8aWQgc3JjPSJDTj13c2FhaG9tbywgTz1BRklQLCBDPUFSLCBTRVJJQUxOVU1CRVI9Q1VJVCAzMzY5MzQ1MDIzOSIgZHN0PSJDTj13c2NkYywgTz1BRklQLCBDPUFSIiB1bmlxdWVfaWQ9IjM0NjM1OTU4MzMiIGdlbl90aW1lPSIxNjI3MzExNDk0IiBleHBfdGltZT0iMTYyNzM1NDc1NCIvPgogICAgPG9wZXJhdGlvbiB0eXBlPSJsb2dpbiIgdmFsdWU9ImdyYW50ZWQiPgogICAgICAgIDxsb2dpbiBlbnRpdHk9IjMzNjkzNDUwMjM5IiBzZXJ2aWNlPSJ3c2NkYyIgdWlkPSJTRVJJQUxOVU1CRVI9Q1VJVCAyMDI2NzU2NTM5MywgQ049cmVpbmdhcnQyMDIxIiBhdXRobWV0aG9kPSJjbXMiIHJlZ21ldGhvZD0iMjIiPgogICAgICAgICAgICA8cmVsYXRpb25zPgogICAgICAgICAgICAgICAgPHJlbGF0aW9uIGtleT0iMjAyNjc1NjUzOTMiIHJlbHR5cGU9IjQiLz4KICAgICAgICAgICAgPC9yZWxhdGlvbnM+CiAgICAgICAgPC9sb2dpbj4KICAgIDwvb3BlcmF0aW9uPgo8L3Nzbz4K</token>\n + \ <sign>kNs1Aw63aaFKfJ5vU9bxTmQlcKzAUVnQzoWU5k126Rfwq50bDkEtMR1Cs2V98M5mvirK4MqtGUIjE3Ol67zuftEPi9yJRWtJ3RZemCMfImulE7yrmWAJGldcIbmh4Nt/lctnk2iROwSS/GfiKAz29GUjZkv9f30GcixCcuEPCI8=</sign>\n + \ </credentials>\n</loginTicketResponse>\n" + headers: + Content-Type: + - text/xml;charset=utf-8 + Date: + - Mon, 26 Jul 2021 14:59:14 GMT + Set-Cookie: + - TS01b14f84=0145b27a972e6333cdd97e5a04ebef2c63a5c7e890b28c9ca6cff12f5994848a9aa34d1d52; + Path=/ + Transfer-Encoding: + - chunked + status: + code: 200 + message: OK +- request: + body: null + headers: + accept-encoding: + - gzip, deflate + user-agent: + - Mozilla/5.0 (Windows NT 6.1; Win64; x64) + method: GET + uri: https://wswhomo.afip.gov.ar/WSCDC/service.asmx?WSDL + response: + body: + string: "\r\n\r\n Web Service Orientado a la + Constatacion de Comprobantes. \r\n \r\n + \ \r\n + \ \r\n \r\n + \ \r\n \r\n \r\n + \ \r\n \r\n \r\n + \ \r\n \r\n \r\n \r\n \r\n + \ \r\n \r\n + \ \r\n \r\n \r\n \r\n \r\n + \ \r\n \r\n + \ \r\n \r\n \r\n + \ \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n + \ \r\n \r\n \r\n \r\n \r\n + \ \r\n \r\n \r\n \r\n \r\n \r\n + \ \r\n \r\n \r\n + \ \r\n \r\n \r\n \r\n \r\n + \ \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n + \ \r\n \r\n + \ \r\n \r\n \r\n \r\n \r\n \r\n + \ \r\n \r\n + \ \r\n \r\n + \ \r\n \r\n \r\n + \ \r\n \r\n + \ \r\n \r\n \r\n \r\n \r\n + \ \r\n \r\n + \ \r\n \r\n \r\n + \ \r\n \r\n \r\n \r\n \r\n + \ \r\n \r\n + \ \r\n \r\n \r\n \r\n \r\n \r\n + \ \r\n \r\n + \ \r\n \r\n + \ \r\n \r\n \r\n + \ \r\n \r\n + \ \r\n \r\n \r\n \r\n \r\n + \ \r\n \r\n + \ \r\n \r\n \r\n + \ \r\n \r\n \r\n \r\n \r\n + \ \r\n \r\n + \ \r\n \r\n \r\n \r\n \r\n \r\n + \ \r\n \r\n + \ \r\n \r\n + \ \r\n \r\n \r\n + \ \r\n \r\n + \ \r\n \r\n \r\n \r\n \r\n + \ \r\n \r\n + \ \r\n \r\n + \ \r\n \r\n + \ \r\n \r\n \r\n \r\n \r\n + \ \r\n \r\n + \ \r\n \r\n \r\n \r\n + \ \r\n \r\n \r\n + \ \r\n \r\n \r\n \r\n \r\n \r\n \r\n + \ \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n + \ \r\n \r\n \r\n \r\n \r\n + \ \r\n \r\n + \ \r\n \r\n \r\n \r\n \r\n \r\n + \ \r\n \r\n \r\n + \ \r\n \r\n \r\n \r\n \r\n + \ \r\n \r\n \r\n + \ \r\n \r\n \r\n + \ \r\n \r\n \r\n + \ \r\n \r\n \r\n \r\n \r\n \r\n \r\n + \ \r\n \r\n + \ \r\n \r\n \r\n + \ \r\n \r\n \r\n + \ \r\n \r\n \r\n \r\n + \ \r\n \r\n \r\n \r\n + \ \r\n \r\n + \ \r\n \r\n + \ \r\n \r\n \r\n + \ \r\n \r\n \r\n + \ \r\n \r\n \r\n + \ \r\n \r\n \r\n + \ \r\n \r\n \r\n + \ \r\n \r\n \r\n + \ \r\n \r\n \r\n + \ \r\n + \ \r\n \r\n + \ \r\n \r\n \r\n + \ \r\n + \ \r\n \r\n + \ \r\n \r\n \r\n \r\n Determina + los modos de facturaci\xF3n habilitados a consultar por este medio.\r\n + \ \r\n + \ \r\n + \ \r\n \r\n + \ Recupera + los Tipos de Comprobantes habilitados a consultar por este medio.\r\n + \ \r\n \r\n \r\n + \ \r\n Recupera los Tipos de Documentos + habilitados a consultar por este medio.\r\n \r\n \r\n \r\n \r\n + \ Recupera + el listado de identificadores para los campos Opcionales\r\n + \ \r\n \r\n \r\n + \ \r\n Constataci\xF3n de comprobantes + de forma electronica\r\n \r\n \r\n + \ \r\n \r\n + \ Metodo + dummy para verificacion de funcionamiento\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n + \ \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n + \ \r\n Web + Service Orientado a la Constatacion de Comprobantes. \r\n + \ \r\n \r\n \r\n + \ \r\n \r\n \r\n + \ \r\n" + headers: + Cache-Control: + - private, max-age=0 + Content-Length: + - '21454' + Content-Type: + - text/xml; charset=utf-8 + Date: + - Mon, 26 Jul 2021 14:59:17 GMT + Expect-CT: + - enforce + MicrosoftOfficeWebServer: + - 5.0_Pub + Set-Cookie: + - TS01983a04=01439f1ddfd0c90d038baeb1d7fb593be8a43aaff9ccc8674d4c33f829132a9958b756465f; + Path=/ + Strict-Transport-Security: + - nosniff + X-AspNet-Version: + - 2.0.50727 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-Powered-By: + - ASP.NET + X-Xss-Protection: + - 1; mode=block + status: + code: 200 + message: OK +version: 1 diff --git a/tests/cassettes/test_wscdc/test_inicializar.yaml b/tests/cassettes/test_wscdc/test_inicializar.yaml index fcf687721..928581143 100644 --- a/tests/cassettes/test_wscdc/test_inicializar.yaml +++ b/tests/cassettes/test_wscdc/test_inicializar.yaml @@ -1,13 +1,76 @@ interactions: +- request: + body: null + headers: + accept-encoding: + - gzip, deflate + user-agent: + - Mozilla/5.0 (Windows NT 6.1; Win64; x64) + method: GET + uri: https://wsaahomo.afip.gov.ar/ws/services/LoginCms?wsdl + response: + body: + string: "\n\n\n \n + \ \n \n + \ \n \n \n \n \n \n + \ \n \n \n + \ \n \n + \ \n \n \n \n \n \n + \ \n \n \n + \ \n \n\n \n\n + \ \n\n \n\n + \ \n\n \n\n \n\n \n\n \n\n + \ \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n + \ \n\n + \ \n\n \n\n \n\n \n\n + \ \n\n \n\n + \ \n\n + \ \n\n \n\n + \ \n\n \n\n \n\n \n\n + \ \n\n \n\n + \ \n\n \n\n \n\n \n\n + \ \n\n \n\n \n\n \n\n \n\n + \ \n\n\n" + headers: + Content-Type: + - text/xml;charset=utf-8 + Date: + - Mon, 26 Jul 2021 15:06:33 GMT + Set-Cookie: + - TS01b14f84=0145b27a97ed7f32e2a07b14da099afaabafb0e2b1b08f7e42475b7f5d64a956180af4cfd5; + Path=/ + Transfer-Encoding: + - chunked + status: + code: 200 + message: OK - request: body: "\n\n\n - \ \n MIIG/AYJKoZIhvcNAQcCoIIG7TCCBukCAQExDzANBglghkgBZQMEAgEFADCCASAG\nCSqGSIb3DQEHAaCCAREEggENPD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0i\nVVRGLTgiPz48bG9naW5UaWNrZXRSZXF1ZXN0IHZlcnNpb249IjE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9w0DAgICAIAwDQYIKoZIhvcNAwIC\nAUAwBwYFKw4DAgcwDQYIKoZIhvcNAwICASgwDQYJKoZIhvcNAQEBBQAEggEAk04/\n3BlLqRATY/ZrUoF8EVMtfzkoQrf9SAbMjL3oOEe8rgB/f+pTuOcmreDdfXnYxH1C\nmxhKPo2BIOjTxNzRBS8Qc/EBoRVTVRAm7EmhJN6pefd9vY0o9tR8eb0uKJOLwx6e\nSqc8OBGaW+N16rB8rLkVmTaOJ1yzsxeYTEZMleEZ6CNQoaIGdmCmu1l2S1+c1qB/\nvPyXUmy2XEY5mTI+7sCXq4tUAxHI3kwp46SzNFUMrIgfTmU24Xfpd7oPytLUTF2I\nbciIuSTKpuCz4UP9LT5EGYDtWGATltlFOjUl4bjWq/4KTogqbByQkew97XgL+0Xg\nfGZdJgpPG3khasJxHg==\n\n\n\n" headers: accept-encoding: - gzip, deflate content-length: - - '2726' + - '2722' content-type: - text/xml; charset="UTF-8" soapaction: @@ -24,19 +87,19 @@ interactions: version="1.0" encoding="UTF-8" standalone="yes"?>\n<loginTicketResponse version="1.0">\n <header>\n <source>CN=wsaahomo, O=AFIP, C=AR, SERIALNUMBER=CUIT 33693450239</source>\n <destination>SERIALNUMBER=CUIT - 20267565393, CN=reingart2019pub</destination>\n <uniqueId>3226739509</uniqueId>\n - \ <generationTime>2021-06-20T15:33:58.185-03:00</generationTime>\n - \ <expirationTime>2021-06-21T03:33:58.185-03:00</expirationTime>\n - \ </header>\n <credentials>\n <token>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9InllcyI/Pgo8c3NvIHZlcnNpb249IjIuMCI+CiAgICA8aWQgc3JjPSJDTj13c2FhaG9tbywgTz1BRklQLCBDPUFSLCBTRVJJQUxOVU1CRVI9Q1VJVCAzMzY5MzQ1MDIzOSIgZHN0PSJDTj13c2NkYywgTz1BRklQLCBDPUFSIiB1bmlxdWVfaWQ9IjIyMTQxNjc2MTAiIGdlbl90aW1lPSIxNjI0MjEzOTc4IiBleHBfdGltZT0iMTYyNDI1NzIzOCIvPgogICAgPG9wZXJhdGlvbiB0eXBlPSJsb2dpbiIgdmFsdWU9ImdyYW50ZWQiPgogICAgICAgIDxsb2dpbiBlbnRpdHk9IjMzNjkzNDUwMjM5IiBzZXJ2aWNlPSJ3c2NkYyIgdWlkPSJTRVJJQUxOVU1CRVI9Q1VJVCAyMDI2NzU2NTM5MywgQ049cmVpbmdhcnQyMDE5cHViIiBhdXRobWV0aG9kPSJjbXMiIHJlZ21ldGhvZD0iMjIiPgogICAgICAgICAgICA8cmVsYXRpb25zPgogICAgICAgICAgICAgICAgPHJlbGF0aW9uIGtleT0iMjAyNjc1NjUzOTMiIHJlbHR5cGU9IjQiLz4KICAgICAgICAgICAgPC9yZWxhdGlvbnM+CiAgICAgICAgPC9sb2dpbj4KICAgIDwvb3BlcmF0aW9uPgo8L3Nzbz4K</token>\n - \ <sign>nhfLjDQoBGYulsW7JhT+xDHcIEHtNB2qm/lv34aSTm1OqyZIXjHfLJTz0/X5xbHLrYAkdGQe0FYBoCMhL1NKVe4izP7hkPyDDeU2VgVVFktAc0xlnu4MXp6O9ioc9fGyT6iTb4TFbPNI9wwd+mjoCI8Yj+QASRS+opqL5zjApaQ=</sign>\n + 20267565393, CN=reingart2021</destination>\n <uniqueId>3087994628</uniqueId>\n + \ <generationTime>2021-07-26T12:06:34.577-03:00</generationTime>\n + \ <expirationTime>2021-07-27T00:06:34.577-03:00</expirationTime>\n + \ </header>\n <credentials>\n <token>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9InllcyI/Pgo8c3NvIHZlcnNpb249IjIuMCI+CiAgICA8aWQgc3JjPSJDTj13c2FhaG9tbywgTz1BRklQLCBDPUFSLCBTRVJJQUxOVU1CRVI9Q1VJVCAzMzY5MzQ1MDIzOSIgZHN0PSJDTj13c2NkYywgTz1BRklQLCBDPUFSIiB1bmlxdWVfaWQ9IjM4MzI1NjU2NzgiIGdlbl90aW1lPSIxNjI3MzExOTM0IiBleHBfdGltZT0iMTYyNzM1NTE5NCIvPgogICAgPG9wZXJhdGlvbiB0eXBlPSJsb2dpbiIgdmFsdWU9ImdyYW50ZWQiPgogICAgICAgIDxsb2dpbiBlbnRpdHk9IjMzNjkzNDUwMjM5IiBzZXJ2aWNlPSJ3c2NkYyIgdWlkPSJTRVJJQUxOVU1CRVI9Q1VJVCAyMDI2NzU2NTM5MywgQ049cmVpbmdhcnQyMDIxIiBhdXRobWV0aG9kPSJjbXMiIHJlZ21ldGhvZD0iMjIiPgogICAgICAgICAgICA8cmVsYXRpb25zPgogICAgICAgICAgICAgICAgPHJlbGF0aW9uIGtleT0iMjAyNjc1NjUzOTMiIHJlbHR5cGU9IjQiLz4KICAgICAgICAgICAgPC9yZWxhdGlvbnM+CiAgICAgICAgPC9sb2dpbj4KICAgIDwvb3BlcmF0aW9uPgo8L3Nzbz4K</token>\n + \ <sign>ptwqJpH93NvQUshFtiVVgLy+9zZYHkKKP2A9MHiybb2MM9AhBD+hnrFuZ5BFeOBk1KZ4WE4Xz+zePA4Y/bbuiHvhk0bjLXaqmbFTZVVwbVZPjMqIDHwo5OBNqNpLPdyEQvZ6Z3wCCuoYN6rwwrHikw9trJeOrQnLugSloaY0uk8=</sign>\n \ </credentials>\n</loginTicketResponse>\n" headers: Content-Type: - text/xml;charset=utf-8 Date: - - Sun, 20 Jun 2021 18:33:58 GMT + - Mon, 26 Jul 2021 15:06:34 GMT Set-Cookie: - - TS01b14f84=0145b27a97e7a9959fc25e2048b59b8235083272123a488d61510d949aac06bf02cc8786fe; + - TS01b14f84=0145b27a9713d7e090dac05ad5ec92651c23faf449d43d0dcc26270054c739b7db31ee931f; Path=/ Transfer-Encoding: - chunked @@ -333,13 +396,13 @@ interactions: Content-Type: - text/xml; charset=utf-8 Date: - - Sun, 20 Jun 2021 18:34:00 GMT + - Mon, 26 Jul 2021 15:06:37 GMT Expect-CT: - enforce MicrosoftOfficeWebServer: - 5.0_Pub Set-Cookie: - - TS01983a04=01439f1ddfd35dbcbbf825352b6b1061ff8edd7704ce23cfcbcb2fa696634bb6a67b071da9; + - TS01983a04=01439f1ddfe9cb6f7481e7b06831f9702cfb28fd3814771ed8e3e8cdc145e6a2806d66548a; Path=/ Strict-Transport-Security: - nosniff diff --git a/tests/cassettes/test_wscdc/test_main.yaml b/tests/cassettes/test_wscdc/test_main.yaml new file mode 100644 index 000000000..dc44b03b3 --- /dev/null +++ b/tests/cassettes/test_wscdc/test_main.yaml @@ -0,0 +1,57 @@ +interactions: +- request: + body: "\n\n\n + \ \n\n" + headers: + accept-encoding: + - gzip, deflate + content-length: + - '269' + content-type: + - text/xml; charset="UTF-8" + soapaction: + - '"http://servicios1.afip.gob.ar/wscdc/ComprobanteDummy"' + user-agent: + - Mozilla/5.0 (Windows NT 6.1; Win64; x64) + method: POST + uri: https://wswhomo.afip.gov.ar/WSCDC/service.asmx + response: + body: + string: HomologacionExterno + - efa2021-07-22T18:48:13.6756748-03:002.0.2.0OKOKOK + headers: + Cache-Control: + - private, max-age=0 + Content-Length: + - '679' + Content-Type: + - text/xml; charset=utf-8 + Date: + - Thu, 22 Jul 2021 21:48:13 GMT + Expect-CT: + - enforce + MicrosoftOfficeWebServer: + - 5.0_Pub + Set-Cookie: + - TS01983a04=01439f1ddfd12e25d7171f5fa5593e0f3d3c9d6845a4b53ccb7cb9f820b693ce3674154ad0; + Path=/ + Strict-Transport-Security: + - nosniff + X-AspNet-Version: + - 2.0.50727 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-Powered-By: + - ASP.NET + X-Xss-Protection: + - 1; mode=block + status: + code: 200 + message: OK +version: 1 diff --git a/tests/cassettes/test_wscdc/test_main_params.yaml b/tests/cassettes/test_wscdc/test_main_params.yaml new file mode 100644 index 000000000..ca4bb0148 --- /dev/null +++ b/tests/cassettes/test_wscdc/test_main_params.yaml @@ -0,0 +1,306 @@ +interactions: +- request: + body: "\n\n\n + \ \n + \ PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9InllcyI/Pgo8c3NvIHZlcnNpb249IjIuMCI+CiAgICA8aWQgc3JjPSJDTj13c2FhaG9tbywgTz1BRklQLCBDPUFSLCBTRVJJQUxOVU1CRVI9Q1VJVCAzMzY5MzQ1MDIzOSIgZHN0PSJDTj13c2NkYywgTz1BRklQLCBDPUFSIiB1bmlxdWVfaWQ9IjEwMzE1MDA2NDciIGdlbl90aW1lPSIxNjI2OTkwNTM1IiBleHBfdGltZT0iMTYyNzAzMzc5NSIvPgogICAgPG9wZXJhdGlvbiB0eXBlPSJsb2dpbiIgdmFsdWU9ImdyYW50ZWQiPgogICAgICAgIDxsb2dpbiBlbnRpdHk9IjMzNjkzNDUwMjM5IiBzZXJ2aWNlPSJ3c2NkYyIgdWlkPSJTRVJJQUxOVU1CRVI9Q1VJVCAyMDI2NzU2NTM5MywgQ049cmVpbmdhcnQyMDIxIiBhdXRobWV0aG9kPSJjbXMiIHJlZ21ldGhvZD0iMjIiPgogICAgICAgICAgICA8cmVsYXRpb25zPgogICAgICAgICAgICAgICAgPHJlbGF0aW9uIGtleT0iMjAyNjc1NjUzOTMiIHJlbHR5cGU9IjQiLz4KICAgICAgICAgICAgPC9yZWxhdGlvbnM+CiAgICAgICAgPC9sb2dpbj4KICAgIDwvb3BlcmF0aW9uPgo8L3Nzbz4KitK5HrP155Zn7nN4kPIsAHHAq1epI6sj8srnKiGRRd5+4ZsshE8Br7TrYnKC4hBiuVnFuwDRaZsy7sV5AfyP4hYFuzkaNrWgsqTSCyIALUAsSDhRnRzTKMTulOd844USke8Kkgsk2LI11a/UzEN1wtid8nfc07EW3t3X6CBO0Cs=20267565393\n\n" + headers: + accept-encoding: + - gzip, deflate + content-length: + - '1389' + content-type: + - text/xml; charset="UTF-8" + soapaction: + - '"http://servicios1.afip.gob.ar/wscdc/ComprobantesModalidadConsultar"' + user-agent: + - Mozilla/5.0 (Windows NT 6.1; Win64; x64) + method: POST + uri: https://wswhomo.afip.gov.ar/WSCDC/service.asmx + response: + body: + string: HomologacionExterno + - efa2021-07-22T18:51:02.8646416-03:002.0.2.0CAEComprobantes + - CAECAEAComprobantes - CAEACAIComprobantes + - CAI0 + headers: + Cache-Control: + - no-cache + Content-Length: + - '937' + Content-Type: + - text/xml; charset=utf-8 + Date: + - Thu, 22 Jul 2021 21:51:41 GMT + Expect-CT: + - enforce + Expires: + - '-1' + MicrosoftOfficeWebServer: + - 5.0_Pub + Pragma: + - no-cache + Set-Cookie: + - TS01983a04=01439f1ddf8e84898775a43c2d5590bf0c77191261dc06fba7dc21cf593e1b44f1ac931374; + Path=/ + Strict-Transport-Security: + - nosniff + X-AspNet-Version: + - 2.0.50727 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-Powered-By: + - ASP.NET + X-Xss-Protection: + - 1; mode=block + status: + code: 200 + message: OK +- request: + body: "\n\n\n + \ \n + \ PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9InllcyI/Pgo8c3NvIHZlcnNpb249IjIuMCI+CiAgICA8aWQgc3JjPSJDTj13c2FhaG9tbywgTz1BRklQLCBDPUFSLCBTRVJJQUxOVU1CRVI9Q1VJVCAzMzY5MzQ1MDIzOSIgZHN0PSJDTj13c2NkYywgTz1BRklQLCBDPUFSIiB1bmlxdWVfaWQ9IjEwMzE1MDA2NDciIGdlbl90aW1lPSIxNjI2OTkwNTM1IiBleHBfdGltZT0iMTYyNzAzMzc5NSIvPgogICAgPG9wZXJhdGlvbiB0eXBlPSJsb2dpbiIgdmFsdWU9ImdyYW50ZWQiPgogICAgICAgIDxsb2dpbiBlbnRpdHk9IjMzNjkzNDUwMjM5IiBzZXJ2aWNlPSJ3c2NkYyIgdWlkPSJTRVJJQUxOVU1CRVI9Q1VJVCAyMDI2NzU2NTM5MywgQ049cmVpbmdhcnQyMDIxIiBhdXRobWV0aG9kPSJjbXMiIHJlZ21ldGhvZD0iMjIiPgogICAgICAgICAgICA8cmVsYXRpb25zPgogICAgICAgICAgICAgICAgPHJlbGF0aW9uIGtleT0iMjAyNjc1NjUzOTMiIHJlbHR5cGU9IjQiLz4KICAgICAgICAgICAgPC9yZWxhdGlvbnM+CiAgICAgICAgPC9sb2dpbj4KICAgIDwvb3BlcmF0aW9uPgo8L3Nzbz4KitK5HrP155Zn7nN4kPIsAHHAq1epI6sj8srnKiGRRd5+4ZsshE8Br7TrYnKC4hBiuVnFuwDRaZsy7sV5AfyP4hYFuzkaNrWgsqTSCyIALUAsSDhRnRzTKMTulOd844USke8Kkgsk2LI11a/UzEN1wtid8nfc07EW3t3X6CBO0Cs=20267565393\n\n" + headers: + accept-encoding: + - gzip, deflate + content-length: + - '1379' + content-type: + - text/xml; charset="UTF-8" + soapaction: + - '"http://servicios1.afip.gob.ar/wscdc/ComprobantesTipoConsultar"' + user-agent: + - Mozilla/5.0 (Windows NT 6.1; Win64; x64) + method: POST + uri: https://wswhomo.afip.gov.ar/WSCDC/service.asmx + response: + body: + string: "HomologacionExterno + - efa2021-07-22T18:51:03.2708942-03:002.0.2.01Factura + A2Nota de D\xE9bito A3Nota + de Cr\xE9dito A4Recibo A5Nota + de Venta al Contado A6Factura B7Nota + de D\xE9bito B8Nota de Cr\xE9dito + B9Recibo B10Nota + de Venta al Contado B11Factura + C12Nota de D\xE9bito C13Nota + de Cr\xE9dito C15Recibo C19Factura + de Exportaci\xF3n20Nota D\xE9b. + P/Operac. con el Exterior21Nota + Cr\xE9d. P/Operac. con el Exterior22Fac. + Perm. Export. Simp. - Dto.855/9730Cbtes. + Compra de Bienes Usados31Mandato/Consignaci\xF3n32Comprobantes + de Compra de Materiales a Reciclar Provenientes34Cbtes. + A del Anexo I, Apartado A,Inc.F),R.G.Nro. 141535Cbtes. + B del Anexo I, Apartado A, Inc. F), R.G. Nro. 141537Nota + D\xE9b/Doc. Equiv. que Cumplan con la R.G. Nro. 141538Nota + Cr\xE9d/Doc. Equiv. que Cumplan con la R.G. Nro. 141539Otros + Comprobantes A que Cumplan con la R.G. Nro. 141540Otros + Comprobantes B que Cumplan con la R.G. Nro. 141551Factura + M52Nota de D\xE9bito M53Nota + de Cr\xE9dito M54Recibo M55Nota + de Venta al Contado M56Comprobantes + M del Anexo I, Apartado A, Inc. F) R.G. Nro.141557Otros + Comprobantes M que Cumplan con la R.G. Nro. 141558Cuenta + de Venta Y L\xEDquido Producto M59Liquidaci\xF3n + M60Cta. de Vta. Y L\xEDquido Prod. + A61Cta. de Vta. Y L\xEDquido Prod. + B63Liquidaci\xF3n A64Liquidaci\xF3n + B70Recibo de Factura de Cr\xE9dito + R91Remito R49Comprobante + de Compra de Bienes Usados27Liquidaci\xF3n + \xDAnica Comercial Impositiva Clase A28Liquidaci\xF3n + \xDAnica Comercial Impositiva Clase B43Nota + de Cr\xE9dito Liquidaci\xF3n \xDAnica Comercial Impositiva Clase B45Nota + de D\xE9bito Liquidaci\xF3n \xDAnica Comercial Impositiva Clase A46Nota + de D\xE9bito Liquidaci\xF3n \xDAnica Comercial Impositiva Clase B48Nota + de Cr\xE9dito Liquidaci\xF3n \xDAnica Comercial Impositiva Clase A201Factura + de Cr\xE9dito (FCE) A202Nota de + D\xE9bito (FCE) A203Nota de Cr\xE9dito + (FCE) A206Factura de Cr\xE9dito + (FCE) B207Nota de D\xE9bito (FCE) + B208Nota de Cr\xE9dito (FCE) B211Factura + de Cr\xE9dito (FCE) C212Nota de + D\xE9bito (FCE) C213Nota de Cr\xE9dito + (FCE) C0" + headers: + Cache-Control: + - no-cache + Content-Length: + - '5083' + Content-Type: + - text/xml; charset=utf-8 + Date: + - Thu, 22 Jul 2021 21:51:41 GMT + Expect-CT: + - enforce + Expires: + - '-1' + MicrosoftOfficeWebServer: + - 5.0_Pub + Pragma: + - no-cache + Set-Cookie: + - TS01983a04=01439f1ddf84a7a5fa6719c5aa071a3b06e93ec680c1ad8be3283cbf367e41a88be23bf8fe; + Path=/ + Strict-Transport-Security: + - nosniff + X-AspNet-Version: + - 2.0.50727 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-Powered-By: + - ASP.NET + X-Xss-Protection: + - 1; mode=block + status: + code: 200 + message: OK +- request: + body: "\n\n\n + \ \n + \ PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9InllcyI/Pgo8c3NvIHZlcnNpb249IjIuMCI+CiAgICA8aWQgc3JjPSJDTj13c2FhaG9tbywgTz1BRklQLCBDPUFSLCBTRVJJQUxOVU1CRVI9Q1VJVCAzMzY5MzQ1MDIzOSIgZHN0PSJDTj13c2NkYywgTz1BRklQLCBDPUFSIiB1bmlxdWVfaWQ9IjEwMzE1MDA2NDciIGdlbl90aW1lPSIxNjI2OTkwNTM1IiBleHBfdGltZT0iMTYyNzAzMzc5NSIvPgogICAgPG9wZXJhdGlvbiB0eXBlPSJsb2dpbiIgdmFsdWU9ImdyYW50ZWQiPgogICAgICAgIDxsb2dpbiBlbnRpdHk9IjMzNjkzNDUwMjM5IiBzZXJ2aWNlPSJ3c2NkYyIgdWlkPSJTRVJJQUxOVU1CRVI9Q1VJVCAyMDI2NzU2NTM5MywgQ049cmVpbmdhcnQyMDIxIiBhdXRobWV0aG9kPSJjbXMiIHJlZ21ldGhvZD0iMjIiPgogICAgICAgICAgICA8cmVsYXRpb25zPgogICAgICAgICAgICAgICAgPHJlbGF0aW9uIGtleT0iMjAyNjc1NjUzOTMiIHJlbHR5cGU9IjQiLz4KICAgICAgICAgICAgPC9yZWxhdGlvbnM+CiAgICAgICAgPC9sb2dpbj4KICAgIDwvb3BlcmF0aW9uPgo8L3Nzbz4KitK5HrP155Zn7nN4kPIsAHHAq1epI6sj8srnKiGRRd5+4ZsshE8Br7TrYnKC4hBiuVnFuwDRaZsy7sV5AfyP4hYFuzkaNrWgsqTSCyIALUAsSDhRnRzTKMTulOd844USke8Kkgsk2LI11a/UzEN1wtid8nfc07EW3t3X6CBO0Cs=20267565393\n\n" + headers: + accept-encoding: + - gzip, deflate + content-length: + - '1375' + content-type: + - text/xml; charset="UTF-8" + soapaction: + - '"http://servicios1.afip.gob.ar/wscdc/DocumentosTipoConsultar"' + user-agent: + - Mozilla/5.0 (Windows NT 6.1; Win64; x64) + method: POST + uri: https://wswhomo.afip.gov.ar/WSCDC/service.asmx + response: + body: + string: "HomologacionExterno + - efa2021-07-22T18:51:03.6927719-03:002.0.2.080CUIT86CUIL87CDI89LE90LC91CI + Extranjera92en tr\xE1mite93Acta + Nacimiento95CI Bs. As. RNP96DNI94Pasaporte00CI + Polic\xEDa Federal01CI Buenos Aires02CI + Catamarca03CI C\xF3rdoba04CI + Corrientes05CI Entre R\xEDos06CI + Jujuy07CI Mendoza08CI + La Rioja09CI Salta10CI + San Juan11CI San Luis12CI + Santa Fe13CI Santiago del Estero14CI + Tucum\xE1n16CI Chaco17CI + Chubut18CI Formosa19CI + Misiones20CI Neuqu\xE9n21CI + La Pampa22CI R\xEDo Negro23CI + Santa Cruz24CI Tierra del Fuego99Doc. + (Otro)0" + headers: + Cache-Control: + - no-cache + Content-Length: + - '2628' + Content-Type: + - text/xml; charset=utf-8 + Date: + - Thu, 22 Jul 2021 21:51:41 GMT + Expect-CT: + - enforce + Expires: + - '-1' + MicrosoftOfficeWebServer: + - 5.0_Pub + Pragma: + - no-cache + Set-Cookie: + - TS01983a04=01439f1ddf995decae5dd4d82a1b1879c89f2bb98ab5ab0ba0ff4da63a59286e09d76dc6bd; + Path=/ + Strict-Transport-Security: + - nosniff + X-AspNet-Version: + - 2.0.50727 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-Powered-By: + - ASP.NET + X-Xss-Protection: + - 1; mode=block + status: + code: 200 + message: OK +- request: + body: "\n\n\n + \ \n + \ PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9InllcyI/Pgo8c3NvIHZlcnNpb249IjIuMCI+CiAgICA8aWQgc3JjPSJDTj13c2FhaG9tbywgTz1BRklQLCBDPUFSLCBTRVJJQUxOVU1CRVI9Q1VJVCAzMzY5MzQ1MDIzOSIgZHN0PSJDTj13c2NkYywgTz1BRklQLCBDPUFSIiB1bmlxdWVfaWQ9IjEwMzE1MDA2NDciIGdlbl90aW1lPSIxNjI2OTkwNTM1IiBleHBfdGltZT0iMTYyNzAzMzc5NSIvPgogICAgPG9wZXJhdGlvbiB0eXBlPSJsb2dpbiIgdmFsdWU9ImdyYW50ZWQiPgogICAgICAgIDxsb2dpbiBlbnRpdHk9IjMzNjkzNDUwMjM5IiBzZXJ2aWNlPSJ3c2NkYyIgdWlkPSJTRVJJQUxOVU1CRVI9Q1VJVCAyMDI2NzU2NTM5MywgQ049cmVpbmdhcnQyMDIxIiBhdXRobWV0aG9kPSJjbXMiIHJlZ21ldGhvZD0iMjIiPgogICAgICAgICAgICA8cmVsYXRpb25zPgogICAgICAgICAgICAgICAgPHJlbGF0aW9uIGtleT0iMjAyNjc1NjUzOTMiIHJlbHR5cGU9IjQiLz4KICAgICAgICAgICAgPC9yZWxhdGlvbnM+CiAgICAgICAgPC9sb2dpbj4KICAgIDwvb3BlcmF0aW9uPgo8L3Nzbz4KitK5HrP155Zn7nN4kPIsAHHAq1epI6sj8srnKiGRRd5+4ZsshE8Br7TrYnKC4hBiuVnFuwDRaZsy7sV5AfyP4hYFuzkaNrWgsqTSCyIALUAsSDhRnRzTKMTulOd844USke8Kkgsk2LI11a/UzEN1wtid8nfc07EW3t3X6CBO0Cs=20267565393\n\n" + headers: + accept-encoding: + - gzip, deflate + content-length: + - '1375' + content-type: + - text/xml; charset="UTF-8" + soapaction: + - '"http://servicios1.afip.gob.ar/wscdc/OpcionalesTipoConsultar"' + user-agent: + - Mozilla/5.0 (Windows NT 6.1; Win64; x64) + method: POST + uri: https://wswhomo.afip.gov.ar/WSCDC/service.asmx + response: + body: + string: 'HomologacionExterno + - efa2021-07-22T18:51:04.0990245-03:002.0.2.0503Sin + Resultados: - Metodo OpcionalesTipoConsultar0' + headers: + Cache-Control: + - no-cache + Content-Length: + - '777' + Content-Type: + - text/xml; charset=utf-8 + Date: + - Thu, 22 Jul 2021 21:51:42 GMT + Expect-CT: + - enforce + Expires: + - '-1' + MicrosoftOfficeWebServer: + - 5.0_Pub + Pragma: + - no-cache + Set-Cookie: + - TS01983a04=01439f1ddf2c29251c6d94862738fe8279bf59a7609fea5579c567ab2f58b76cd3e3621fb0; + Path=/ + Strict-Transport-Security: + - nosniff + X-AspNet-Version: + - 2.0.50727 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-Powered-By: + - ASP.NET + X-Xss-Protection: + - 1; mode=block + status: + code: 200 + message: OK +version: 1 diff --git a/tests/cassettes/test_wscdc/test_main_prueba.yaml b/tests/cassettes/test_wscdc/test_main_prueba.yaml new file mode 100644 index 000000000..126ede725 --- /dev/null +++ b/tests/cassettes/test_wscdc/test_main_prueba.yaml @@ -0,0 +1,59 @@ +interactions: +- request: + body: "\n\n\n + \ \n + \ PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9InllcyI/Pgo8c3NvIHZlcnNpb249IjIuMCI+CiAgICA8aWQgc3JjPSJDTj13c2FhaG9tbywgTz1BRklQLCBDPUFSLCBTRVJJQUxOVU1CRVI9Q1VJVCAzMzY5MzQ1MDIzOSIgZHN0PSJDTj13c2NkYywgTz1BRklQLCBDPUFSIiB1bmlxdWVfaWQ9IjEwMzE1MDA2NDciIGdlbl90aW1lPSIxNjI2OTkwNTM1IiBleHBfdGltZT0iMTYyNzAzMzc5NSIvPgogICAgPG9wZXJhdGlvbiB0eXBlPSJsb2dpbiIgdmFsdWU9ImdyYW50ZWQiPgogICAgICAgIDxsb2dpbiBlbnRpdHk9IjMzNjkzNDUwMjM5IiBzZXJ2aWNlPSJ3c2NkYyIgdWlkPSJTRVJJQUxOVU1CRVI9Q1VJVCAyMDI2NzU2NTM5MywgQ049cmVpbmdhcnQyMDIxIiBhdXRobWV0aG9kPSJjbXMiIHJlZ21ldGhvZD0iMjIiPgogICAgICAgICAgICA8cmVsYXRpb25zPgogICAgICAgICAgICAgICAgPHJlbGF0aW9uIGtleT0iMjAyNjc1NjUzOTMiIHJlbHR5cGU9IjQiLz4KICAgICAgICAgICAgPC9yZWxhdGlvbnM+CiAgICAgICAgPC9sb2dpbj4KICAgIDwvb3BlcmF0aW9uPgo8L3Nzbz4KitK5HrP155Zn7nN4kPIsAHHAq1epI6sj8srnKiGRRd5+4ZsshE8Br7TrYnKC4hBiuVnFuwDRaZsy7sV5AfyP4hYFuzkaNrWgsqTSCyIALUAsSDhRnRzTKMTulOd844USke8Kkgsk2LI11a/UzEN1wtid8nfc07EW3t3X6CBO0Cs=20267565393CAE20267565393361201312311.2163533727749637990\n\n" + headers: + accept-encoding: + - gzip, deflate + content-length: + - '1678' + content-type: + - text/xml; charset="UTF-8" + soapaction: + - '"http://servicios1.afip.gob.ar/wscdc/ComprobanteConstatar"' + user-agent: + - Mozilla/5.0 (Windows NT 6.1; Win64; x64) + method: POST + uri: https://wswhomo.afip.gov.ar/WSCDC/service.asmx + response: + body: + string: "HomologacionExterno + - efa2021-07-22T18:50:38.8332378-03:002.0.2.0CAE20267565393361201312311.2163533727749637990R100El + N\xB0 de CAI/CAE/CAEA consultado no existe en las bases del organismo.202107221850380\r\n" + headers: + Cache-Control: + - private, max-age=0 + Content-Length: + - '1178' + Content-Type: + - text/xml; charset=utf-8 + Date: + - Thu, 22 Jul 2021 21:50:38 GMT + Expect-CT: + - enforce + MicrosoftOfficeWebServer: + - 5.0_Pub + Set-Cookie: + - TS01983a04=01439f1ddff3be051e1c75940e1189a9b17075cadc436825724908a06824d3fb4010986bad; + Path=/ + Strict-Transport-Security: + - nosniff + X-AspNet-Version: + - 2.0.50727 + X-Content-Type-Options: + - nosniff + X-Frame-Options: + - SAMEORIGIN + X-Powered-By: + - ASP.NET + X-Xss-Protection: + - 1; mode=block + status: + code: 200 + message: OK +version: 1 diff --git a/tests/test_wscdc.py b/tests/test_wscdc.py index b4cb1ac24..8af61db32 100644 --- a/tests/test_wscdc.py +++ b/tests/test_wscdc.py @@ -20,7 +20,7 @@ import sys import pytest from pyafipws.wsaa import WSAA -from pyafipws.wscdc import WSCDC +from pyafipws.wscdc import WSCDC, main from pyafipws import wscdc as ws @@ -146,3 +146,24 @@ def test_consultar_tipo_opcionales(wscdc_): assert consulta == [] +def test_main(wscdc_): + sys.argv = [] + sys.argv.append("--dummy") + sys.argv.append("--debug") + main() + +def test_main_formato(wscdc_): + sys.argv = [] + sys.argv.append("--formato") + main() + +def test_main_prueba(wscdc_): + sys.argv = [] + sys.argv.append("--constatar") + sys.argv.append("--prueba") + main() + +def test_main_params(wscdc_): + sys.argv = [] + sys.argv.append("--params") + main() diff --git a/wscdc.py b/wscdc.py index 3940111a5..3afeeae6b 100644 --- a/wscdc.py +++ b/wscdc.py @@ -363,14 +363,17 @@ def main(): % (clave, comienzo, longitud, tipo, desc.encode("latin1")) ) comienzo += longitud - sys.exit(0) + return # leer configuracion global CONFIG_FILE if len(sys.argv) > 1 and sys.argv[1][0] not in "-/": CONFIG_FILE = sys.argv.pop(1) config = SafeConfigParser() - config.read(CONFIG_FILE) + if sys.version_info[0] < 3 : + config.read(CONFIG_FILE, encoding="latin-1") + else: + config.read(CONFIG_FILE) crt = config.get("WSAA", "CERT") key = config.get("WSAA", "PRIVATEKEY") cuit = config.get("WSCDC", "CUIT") @@ -401,7 +404,7 @@ def main(): print("AppServerStatus", wscdc.AppServerStatus) print("DbServerStatus", wscdc.DbServerStatus) print("AuthServerStatus", wscdc.AuthServerStatus) - sys.exit(0) + return # Gestionar credenciales de acceso con AFIP: from .wsaa import WSAA