Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
GISRedeDev committed Jun 23, 2024
1 parent 0503817 commit 24569fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion areasofcontrol/get_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@ def filter_and_save(geojson: dict, id: int, gpkg_dir: Path | str) -> None:
gdf = gdf.dissolve(by=None)
gdf["date"] = layer
gdf.to_file(
Path(gpkg_dir).joinpath(f"{layer}.gpkg"), layer=layer, driver="GPKG"
Path(gpkg_dir).joinpath(f"occupied_{layer}.gpkg"), layer=layer, driver="GPKG"
)
6 changes: 3 additions & 3 deletions tests/test_get_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def test_filter_and_save(mock_get, geojson_key, geojson_mocks):
filter_and_save(geojson, 1706735973, TEST_DIR)
layer = datetime.fromtimestamp(1706735973).strftime("%Y-%m-%d")
if geojson_key == "positive":
assert TEST_DIR.joinpath(f"{layer}.gpkg").exists()
TEST_DIR.joinpath(f"{layer}.gpkg").unlink()
assert TEST_DIR.joinpath(f"occupied_{layer}.gpkg").exists()
TEST_DIR.joinpath(f"occupied_{layer}.gpkg").unlink()
else:
assert not TEST_DIR.joinpath(f"{layer}.gpkg").exists()
assert not TEST_DIR.joinpath(f"occupied_{layer}.gpkg").exists()

0 comments on commit 24569fb

Please sign in to comment.