Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename http.py -> web.py #133

Merged
merged 2 commits into from
Oct 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cogeo_mosaic/backends/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
from cogeo_mosaic.backends.base import BaseBackend
from cogeo_mosaic.backends.dynamodb import DynamoDBBackend
from cogeo_mosaic.backends.file import FileBackend
from cogeo_mosaic.backends.http import HttpBackend
from cogeo_mosaic.backends.s3 import S3Backend
from cogeo_mosaic.backends.stac import STACBackend
from cogeo_mosaic.backends.web import HttpBackend


def MosaicBackend(url: str, *args: Any, **kwargs: Any) -> BaseBackend:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
"""cogeo-mosaic HTTP backend."""
"""cogeo-mosaic HTTP backend.

This file is named web.py instead of http.py because http is a Python standard
lib module
"""

import json
from typing import Any
Expand Down
4 changes: 2 additions & 2 deletions tests/test_backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
from cogeo_mosaic.backends import MosaicBackend
from cogeo_mosaic.backends.dynamodb import DynamoDBBackend
from cogeo_mosaic.backends.file import FileBackend
from cogeo_mosaic.backends.http import HttpBackend
from cogeo_mosaic.backends.s3 import S3Backend
from cogeo_mosaic.backends.stac import STACBackend
from cogeo_mosaic.backends.stac import _fetch as stac_search
from cogeo_mosaic.backends.stac import default_stac_accessor as stac_accessor
from cogeo_mosaic.backends.utils import _decompress_gz
from cogeo_mosaic.backends.web import HttpBackend
from cogeo_mosaic.errors import MosaicError, MosaicExistsError, NoAssetFoundError
from cogeo_mosaic.mosaic import MosaicJSON

Expand Down Expand Up @@ -145,7 +145,7 @@ def content(self):
return self.data


@patch("cogeo_mosaic.backends.http.requests")
@patch("cogeo_mosaic.backends.web.requests")
def test_http_backend(requests):
"""Test HTTP backend."""
with open(mosaic_json, "r") as f:
Expand Down