Skip to content

Commit b67e5ca

Browse files
committed
✅ minor update to job tests
1 parent bab3254 commit b67e5ca

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

mindee/parsing/v2/field/field_location.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33

44

55
class FieldLocation:
6-
"""Location of a field."""
6+
"""A field's location on the document."""
77

88
polygon: Polygon
9+
"""Position information as a list of points in clockwise order."""
910
page: int
11+
"""0-based page index of where the polygon is located."""
1012

1113
def __init__(self, server_response: StringDict) -> None:
1214
"""

tests/v2/parsing/test_job_response.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ def test_should_load_when_status_is_processing():
2323

2424
assert response.job is not None
2525
assert response.job.status == "Processing"
26+
assert isinstance(response.job.created_at, datetime)
2627
assert response.job.completed_at is None
2728
assert response.job.error is None
2829

@@ -35,6 +36,7 @@ def test_should_load_when_status_is_processed():
3536

3637
assert response.job is not None
3738
assert response.job.status == "Processed"
39+
assert isinstance(response.job.created_at, datetime)
3840
assert isinstance(response.job.completed_at, datetime)
3941
assert response.job.error is None
4042

@@ -47,6 +49,7 @@ def test_should_load_with_422_error():
4749

4850
assert response.job is not None
4951
assert response.job.status == "Failed"
52+
assert isinstance(response.job.created_at, datetime)
5053
assert isinstance(response.job.completed_at, datetime)
5154

5255
assert isinstance(response.job.error, ErrorResponse)

0 commit comments

Comments
 (0)