File tree Expand file tree Collapse file tree 4 files changed +4
-58
lines changed
src/simcore_service_api_server Expand file tree Collapse file tree 4 files changed +4
-58
lines changed Original file line number Diff line number Diff line change @@ -22,9 +22,9 @@ class Identity(BaseModel):
2222
2323def _create_exception () -> HTTPException :
2424 _unauthorized_headers = {
25- "WWW-Authenticate" : f'Basic realm=" { basic_scheme . realm } "'
26- if basic_scheme .realm
27- else "Basic"
25+ "WWW-Authenticate" : (
26+ f'Basic realm=" { basic_scheme . realm } "' if basic_scheme .realm else "Basic"
27+ )
2828 }
2929 return HTTPException (
3030 status_code = status .HTTP_401_UNAUTHORIZED ,
@@ -46,7 +46,7 @@ async def get_current_identity(
4646 if user_and_product is None :
4747 exc = _create_exception ()
4848 raise exc
49- email = await users_repo .get_active_user_email (user_and_product .user_id )
49+ email = await users_repo .get_active_user_email (user_id = user_and_product .user_id )
5050 if not email :
5151 exc = _create_exception ()
5252 raise exc
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 66from pathlib import Path
77from pprint import pprint
88from typing import Any
9- from unittest import mock
109from zipfile import ZipFile
1110
1211import arrow
@@ -212,7 +211,6 @@ async def test_run_solver_job(
212211 project_id : str ,
213212 solver_key : str ,
214213 solver_version : str ,
215- mocked_groups_extra_properties : mock .Mock ,
216214):
217215 oas = directorv2_service_openapi_specs
218216
Original file line number Diff line number Diff line change 99from copy import deepcopy
1010from pathlib import Path
1111from typing import Any
12- from unittest import mock
1312from unittest .mock import MagicMock
1413
1514import aiohttp .test_utils
@@ -190,20 +189,6 @@ def auth(
190189 return HTTPBasicAuth (user_api_key , user_api_secret )
191190
192191
193- @pytest .fixture
194- def mocked_groups_extra_properties (mocker : MockerFixture ) -> mock .Mock :
195- from simcore_service_api_server .db .repositories .groups_extra_properties import (
196- GroupsExtraPropertiesRepository ,
197- )
198-
199- return mocker .patch .object (
200- GroupsExtraPropertiesRepository ,
201- "use_on_demand_clusters" ,
202- autospec = True ,
203- return_value = True ,
204- )
205-
206-
207192## MOCKED S3 service --------------------------------------------------
208193
209194
You can’t perform that action at this time.
0 commit comments