Skip to content

Commit 9107d48

Browse files
committed
[client] Add API for asset expectations
1 parent 41cd1ea commit 9107d48

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pyobas/apis/inject_expectation.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,14 @@ def expectations_for_source(self, source_id: str, **kwargs: Any) -> Dict[str, An
2121
result = self.openbas.http_get(path, **kwargs)
2222
return result
2323

24+
@exc.on_http_error(exc.OpenBASUpdateError)
25+
def expectations_assets_for_source(
26+
self, source_id: str, **kwargs: Any
27+
) -> Dict[str, Any]:
28+
path = f"{self.path}/assets/" + source_id
29+
result = self.openbas.http_get(path, **kwargs)
30+
return result
31+
2432
@exc.on_http_error(exc.OpenBASUpdateError)
2533
def prevention_expectations_for_source(
2634
self, source_id: str, **kwargs: Any

0 commit comments

Comments
 (0)