Import googlemaps as gm everywhere
This commit is contained in:
parent
d006752194
commit
d660f0cc4e
2 changed files with 3 additions and 2 deletions
|
|
@ -545,6 +545,7 @@ banned-from = [
|
||||||
[tool.ruff.lint.flake8-import-conventions.extend-aliases]
|
[tool.ruff.lint.flake8-import-conventions.extend-aliases]
|
||||||
|
|
||||||
"collections.abc" = "cabc"
|
"collections.abc" = "cabc"
|
||||||
|
"googlemaps" = "gm"
|
||||||
"sqlalchemy" = "sa"
|
"sqlalchemy" = "sa"
|
||||||
"sqlalchemy.dialects.postgresql" = "psql"
|
"sqlalchemy.dialects.postgresql" = "psql"
|
||||||
"sqlalchemy.ext.hybrid" = "sa_hybrid"
|
"sqlalchemy.ext.hybrid" = "sa_hybrid"
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
import json
|
import json
|
||||||
|
|
||||||
import googlemaps
|
import googlemaps as gm
|
||||||
import pytest
|
import pytest
|
||||||
import sqlalchemy as sa
|
import sqlalchemy as sa
|
||||||
from geopy import distance
|
from geopy import distance
|
||||||
|
|
@ -635,7 +635,7 @@ class TestSyncWithGoogleMaps:
|
||||||
def directions(_self, *_args, **_kwargs):
|
def directions(_self, *_args, **_kwargs):
|
||||||
return api_response
|
return api_response
|
||||||
|
|
||||||
monkeypatch.setattr(googlemaps.Client, "directions", directions)
|
monkeypatch.setattr(gm.Client, "directions", directions)
|
||||||
|
|
||||||
def test_sync_instances_with_google_maps(self, path):
|
def test_sync_instances_with_google_maps(self, path):
|
||||||
"""Call the method for a `Path` object without Google data."""
|
"""Call the method for a `Path` object without Google data."""
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue