Skip to content

Commit 7ff4870

Browse files
fix findoc test + update healthcare card table display
1 parent 1c4f77d commit 7ff4870

3 files changed

Lines changed: 11 additions & 4 deletions

File tree

mindee/product/us/healthcare_card/healthcare_card_v1_copay.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,14 @@ def _table_printable_values(self) -> Dict[str, str]:
5050
"""Return values for printing inside an RST table."""
5151
out_dict: Dict[str, str] = {}
5252
out_dict["service_fees"] = float_to_string(self.service_fees)
53-
out_dict["service_name"] = format_for_display(self.service_name, None)
53+
out_dict["service_name"] = format_for_display(self.service_name, 20)
5454
return out_dict
5555

5656
def to_table_line(self) -> str:
5757
"""Output in a format suitable for inclusion in an rST table."""
5858
printable = self._table_printable_values()
5959
out_str: str = f"| {printable['service_fees']:<12} | "
60-
out_str += f"{printable['service_name']:<12} | "
60+
out_str += f"{printable['service_name']:<20} | "
6161
return clean_out_string(out_str)
6262

6363
def __str__(self) -> str:

mindee/product/us/healthcare_card/healthcare_card_v1_document.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def __init__(
109109
def _copays_separator(char: str) -> str:
110110
out_str = " "
111111
out_str += f"+{char * 14}"
112-
out_str += f"+{char * 14}"
112+
out_str += f"+{char * 22}"
113113
return out_str + "+"
114114

115115
def _copays_to_str(self) -> str:
@@ -122,7 +122,7 @@ def _copays_to_str(self) -> str:
122122
out_str = ""
123123
out_str += f"\n{self._copays_separator('-')}\n "
124124
out_str += " | Service Fees"
125-
out_str += " | Service Name"
125+
out_str += " | Service Name "
126126
out_str += f" |\n{self._copays_separator('=')}"
127127
out_str += f"\n {lines}"
128128
out_str += f"\n{self._copays_separator('-')}"

tests/product/financial_document/test_financial_document_v1.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,15 @@ def test_empty_doc(empty_doc: FinancialDocumentV1DocumentType):
8181
assert prediction.locale.value is None
8282
assert prediction.invoice_number.value is None
8383
assert len(prediction.reference_numbers) == 0
84+
assert prediction.billing_address.value is None
85+
assert len(prediction.customer_company_registrations) == 0
86+
assert prediction.customer_id.value is None
87+
assert prediction.customer_name.value is None
8488
assert prediction.date.value is None
8589
assert prediction.due_date.value is None
90+
assert prediction.document_type.value is not None
91+
assert prediction.document_type_extended.value is not None
92+
assert prediction.document_number.value is None
8693
assert prediction.total_net.value is None
8794
assert prediction.total_amount.value is None
8895
assert len(prediction.taxes) == 0

0 commit comments

Comments
 (0)