Create schemas.py
Browse files- schemas.py +8 -0
schemas.py
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import List, Dict, Any
|
| 2 |
+
|
| 3 |
+
def validate_results(results: List[Dict[str, Any]]) -> None:
|
| 4 |
+
for r in results:
|
| 5 |
+
assert isinstance(r["document"], str)
|
| 6 |
+
assert isinstance(r["agency"], str)
|
| 7 |
+
assert isinstance(r["year"], int)
|
| 8 |
+
assert isinstance(r["excerpt"], str)
|