Skip to content

Commit c434076

Browse files
fix tests
1 parent 272c66b commit c434076

4 files changed

Lines changed: 14 additions & 1 deletion

File tree

mindee/parsing/v2/inference.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,12 @@ def __init__(self, raw_response: StringDict):
1818
super().__init__(raw_response)
1919
self.result = InferenceResult(raw_response["result"])
2020
self.active_options = InferenceActiveOptions(raw_response["active_options"])
21+
22+
def __str__(self) -> str:
23+
return (
24+
f"Inference\n#########"
25+
f"\n{self.model}"
26+
f"\n\n{self.file}"
27+
f"\n\n{self.active_options}"
28+
f"\n\n{self.result}\n"
29+
)

mindee/v2/parsing/inference/base_inference_response.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,8 @@ def get_inference_slug(cls) -> str:
3131
"""Getter for the inference slug."""
3232
return cls.inference_type.get_slug()
3333

34+
def __str__(self) -> str:
35+
return str(self.inference)
36+
3437

3538
TypeInferenceResponse = TypeVar("TypeInferenceResponse", bound=BaseInferenceResponse)

tests/v2/input/test_local_response.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ def _assert_local_response(local_response):
2020
assert not local_response.is_valid_hmac_signature(
2121
fake_hmac_signing, "invalid signature"
2222
)
23+
print(local_response.get_hmac_signature(fake_hmac_signing))
2324
assert signature == local_response.get_hmac_signature(fake_hmac_signing)
2425
assert local_response.is_valid_hmac_signature(fake_hmac_signing, signature)
2526
reponse: InferenceResponse = local_response.deserialize_response(InferenceResponse)

0 commit comments

Comments
 (0)