Skip to content

Commit

Permalink
Update test_random_forest_train_and_load_from_jobid
Browse files Browse the repository at this point in the history
  • Loading branch information
soxofaan committed Oct 12, 2022
1 parent 8ad28fe commit 9a5bbac
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -598,13 +598,10 @@ def directory_exists() -> bool:
# Check job_metadata.json.
with open(metadataPath, "r") as f:
metadata = json.load(f)
assert metadata["geometry"].get("type", "") == "GeometryCollection"
actual_geometries = metadata["geometry"].get("geometries", [{}])
assert len(actual_geometries) == 2
assert actual_geometries[0].get("type", "") == "Polygon"
assert actual_geometries[1].get("type", "") == "Polygon"
assert actual_geometries[0].get("coordinates", [{}]) == FEATURE_COLLECTION_1["features"][0]["geometry"]["coordinates"]
assert actual_geometries[1].get("coordinates", [{}]) == FEATURE_COLLECTION_1["features"][1]["geometry"]["coordinates"]
assert metadata["geometry"] == {
"type": "Polygon",
"coordinates": [[[4.79, 51.26], [4.79, 51.30], [4.90, 51.30], [4.90, 51.26], [4.79, 51.26]]],
}
assert metadata.get("assets", {}).get("randomforest.model.tar.gz", {}).get("href", "") == "/data/projects/OpenEO/{jobid}/randomforest.model.tar.gz".format(jobid=job.job_id)

# 2. Load the model using its job id and make predictions.
Expand Down

0 comments on commit 9a5bbac

Please sign in to comment.