Skip to content

Commit

Permalink
Update mock to use moto v5
Browse files Browse the repository at this point in the history
  • Loading branch information
ecomodeller committed Feb 20, 2024
1 parent cd8cde5 commit e369b1d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/drivers/test_sqlite_remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def _s3_db_factory(keys, datasets=None):
return _s3_db_factory


@moto.mock_s3
@moto.mock_aws
def test_remote_database(s3_db_factory):
keys = ("some", "keys")
dbpath = s3_db_factory(keys)
Expand All @@ -94,15 +94,15 @@ def test_invalid_url():
get_driver("foo", provider="sqlite-remote")


@moto.mock_s3
@moto.mock_aws
def test_nonexisting_url():
from terracotta import exceptions, get_driver

with pytest.raises(exceptions.InvalidDatabaseError):
get_driver("s3://foo/db.sqlite")


@moto.mock_s3
@moto.mock_aws
def test_remote_database_cache(s3_db_factory, raster_file, monkeypatch):
keys = ("some", "keys")
dbpath = s3_db_factory(keys)
Expand Down Expand Up @@ -138,7 +138,7 @@ def test_remote_database_cache(s3_db_factory, raster_file, monkeypatch):
assert os.path.getmtime(driver.meta_store._local_path) != modification_date


@moto.mock_s3
@moto.mock_aws
def test_immutability(s3_db_factory, raster_file):
keys = ("some", "keys")
dbpath = s3_db_factory(keys, datasets={("some", "value"): str(raster_file)})
Expand All @@ -157,7 +157,7 @@ def test_immutability(s3_db_factory, raster_file):
driver.delete(("some", "value"))


@moto.mock_s3
@moto.mock_aws
def test_destructor(s3_db_factory, raster_file, capsys):
keys = ("some", "keys")
dbpath = s3_db_factory(keys, datasets={("some", "value"): str(raster_file)})
Expand Down

0 comments on commit e369b1d

Please sign in to comment.