Skip to content

Commit df34d6a

Browse files
review
1 parent 1edb12a commit df34d6a

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

services/web/server/src/simcore_service_webserver/fogbugz/_client.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
from ..products import products_service
1515
from ..products.models import Product
16-
from .settings import FogbugzSettings, get_plugin_settings
16+
from .settings import get_plugin_settings
1717

1818
_logger = logging.getLogger(__name__)
1919

@@ -164,11 +164,7 @@ async def reopen_case(self, case_id: str, assigned_fogbugz_person_id: str) -> No
164164

165165
async def setup_fogbugz_rest_client(app: web.Application) -> None:
166166
"""Setup Fogbugz REST client"""
167-
settings: FogbugzSettings | None = get_plugin_settings(app)
168-
169-
if settings is None:
170-
_logger.warning("Fogbugz settings not configured, skipping setup")
171-
return
167+
settings = get_plugin_settings(app)
172168

173169
# Fail fast if unexpected configuration
174170
products: list[Product] = products_service.list_products(app=app)

services/web/server/src/simcore_service_webserver/fogbugz/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ class FogbugzSettings(BaseCustomSettings):
1111

1212
def get_plugin_settings(app: web.Application) -> FogbugzSettings:
1313
settings = app[APP_SETTINGS_KEY].WEBSERVER_FOGBUGZ
14-
assert settings, "setup_settings not called?" # nosec
14+
assert settings, "plugin.setup_fogbugz not called?" # nosec
1515
assert isinstance(settings, FogbugzSettings) # nosec
1616
return settings

services/web/server/tests/unit/with_dbs/04/test_fogbugz_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def mock_fogbugz_api(fake_api_base_url: str) -> Iterator[respx.MockRouter]:
8181
yield mock
8282

8383

84-
async def test_testit(
84+
async def test_fogubugz_client(
8585
app_environment: EnvVarsDict,
8686
client: TestClient,
8787
mock_fogbugz_api: respx.MockRouter,

0 commit comments

Comments
 (0)