You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
796 B
23 lines
796 B
# -*- coding: utf-8 -*-
|
|
# © 2016 Danimar Ribeiro, Trustcode
|
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
|
|
import os.path
|
|
import unittest
|
|
from pytrustnfe.certificado import Certificado
|
|
from pytrustnfe.nfse.ginfes import consultar_situacao_lote
|
|
|
|
|
|
class test_nfse_ginfes(unittest.TestCase):
|
|
|
|
caminho = os.path.dirname(__file__)
|
|
|
|
def test_consulta_situacao_lote(self):
|
|
pfx_source = open('/home/danimar/Downloads/machado.pfx', 'r').read()
|
|
pfx = Certificado(pfx_source, '123456789')
|
|
|
|
dados = {'ambiente': 'homologacao'}
|
|
retorno = consultar_situacao_lote(
|
|
pfx, consulta=dados, ambiente='homologacao')
|
|
|
|
self.assertNotEqual(retorno['received_xml'], '')
|
|
self.assertEqual(retorno['object'].Cabecalho.Sucesso, True)
|