[Tests][Download Datasheet][Added] field and output missing

This commit is contained in:
Salvador E. Tropea 2024-01-25 13:24:42 -03:00
parent 726aee2f03
commit 2d6fe64b6c
3 changed files with 40 additions and 0 deletions

View File

@ -862,3 +862,21 @@ def test_import_no_str_or_dict(test_dir):
ctx.run(EXIT_BAD_CONFIG)
assert ctx.search_err(r"`import` items must be strings or dicts")
ctx.clean_up(keep_project=True)
@pytest.mark.indep
def test_download_datasheets_no_field(test_dir):
""" Download datasheet no field specified """
ctx = context.TestContext(test_dir, 'bom', 'error_download_datasheets_no_field')
ctx.run(EXIT_BAD_CONFIG)
assert ctx.search_err(r"Empty `field`")
ctx.clean_up(keep_project=True)
@pytest.mark.indep
def test_download_datasheets_no_output(test_dir):
""" Download datasheet no output specified """
ctx = context.TestContext(test_dir, 'bom', 'error_download_datasheets_no_output')
ctx.run(EXIT_BAD_CONFIG)
assert ctx.search_err(r"Empty `output`")
ctx.clean_up(keep_project=True)

View File

@ -0,0 +1,11 @@
# Example KiBot config file
kibot:
version: 1
outputs:
- name: 'down_ds'
comment: "Datasheets"
type: download_datasheets
dir: DS
options:
field: ''

View File

@ -0,0 +1,11 @@
# Example KiBot config file
kibot:
version: 1
outputs:
- name: 'down_ds'
comment: "Datasheets"
type: download_datasheets
dir: DS
options:
output: ''