Skip to content

Commit

Permalink
[skip ci]: black/isort
Browse files Browse the repository at this point in the history
  • Loading branch information
black-isort-bot committed Feb 2, 2024
1 parent 4ca0837 commit fcfdbcd
Showing 1 changed file with 21 additions and 15 deletions.
36 changes: 21 additions & 15 deletions tests/test_create_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,9 @@ def test_create_text_complex_filled(template_stream, pdf_samples, request):


def test_create_checkbox_persist_old_widgets(template_stream, pdf_samples, request):
expected_path = os.path.join(pdf_samples, "widget", "create_checkbox_persist_old_widgets.pdf")
expected_path = os.path.join(
pdf_samples, "widget", "create_checkbox_persist_old_widgets.pdf"
)
with open(expected_path, "rb+") as f:
obj = PdfWrapper(template_stream, global_font="Courier")
obj.widgets["test"].font_size = 30
Expand Down Expand Up @@ -306,7 +308,7 @@ def test_create_widget_sejda(sejda_template, pdf_samples, request):
max_length=6,
font="Times-Roman",
font_size=20,
font_color=(0, 0, 1)
font_color=(0, 0, 1),
).fill(obj.sample_data)
assert obj.schema["properties"]["new_text_field_widget"]["type"] == "string"

Expand All @@ -320,19 +322,23 @@ def test_create_widget_sejda(sejda_template, pdf_samples, request):


def test_create_widget_sejda_schema(sejda_template):
schema = PdfWrapper(sejda_template).create_widget(
widget_type="text",
name="new_text_field_widget",
page_number=1,
x=72,
y=730,
width=120,
height=40,
max_length=6,
font="Times-Roman",
font_size=20,
font_color=(0, 0, 1)
).schema
schema = (
PdfWrapper(sejda_template)
.create_widget(
widget_type="text",
name="new_text_field_widget",
page_number=1,
x=72,
y=730,
width=120,
height=40,
max_length=6,
font="Times-Roman",
font_size=20,
font_color=(0, 0, 1),
)
.schema
)

assert schema["properties"]["new_text_field_widget"]
assert len(schema["properties"]) == 1

0 comments on commit fcfdbcd

Please sign in to comment.