-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from CristianoMafraJunior/cli_damdfe_new
Add generation CLI Damdfe
- Loading branch information
Showing
4 changed files
with
88 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import pytest | ||
from click.testing import CliRunner | ||
|
||
from brazilfiscalreport.cli import cli | ||
|
||
|
||
@pytest.fixture | ||
def runner(): | ||
return CliRunner() | ||
|
||
|
||
def test_generate_dacce(runner): | ||
xml_path = "tests/fixtures/xml_cce_1.xml" | ||
result = runner.invoke(cli, ["dacce", xml_path]) | ||
assert result.exit_code == 0, result.output | ||
|
||
|
||
def test_generate_danfe(runner): | ||
xml_path = "tests/fixtures/nfe_test_1.xml" | ||
result = runner.invoke(cli, ["danfe", xml_path]) | ||
assert result.exit_code == 0, result.output | ||
|
||
|
||
def test_generate_dacte(runner): | ||
xml_path = "tests/fixtures/dacte_test_1.xml" | ||
result = runner.invoke(cli, ["dacte", xml_path]) | ||
assert result.exit_code == 0, result.output | ||
|
||
|
||
def test_generate_damdfe(runner): | ||
xml_path = "tests/fixtures/mdf-e_test_1.xml" | ||
result = runner.invoke(cli, ["damdfe", xml_path]) | ||
assert result.exit_code == 0, result.output |