Skip to content

Commit

Permalink
fix: linter
Browse files Browse the repository at this point in the history
  • Loading branch information
lchen-2101 committed Mar 6, 2024
1 parent fa4b077 commit e250c23
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/routers/institutions.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@ async def get_types(request: Request, response: Response, lei: str, type: Instit

@router.put("/{lei}/types/{type}", response_model=VersionedData[List[SblTypeAssociationDetailsDto]] | None)
@requires("authenticated")
async def update_types(request: Request, response: Response, lei: str, type: InstitutionType, types_patch: SblTypeAssociationPatchDto):
async def update_types(
request: Request, response: Response, lei: str, type: InstitutionType, types_patch: SblTypeAssociationPatchDto
):
match type:
case "sbl":
if fi := await repo.update_sbl_types(
Expand Down
6 changes: 4 additions & 2 deletions tests/api/routers/test_institutions_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,8 +492,10 @@ def test_update_institution_types(self, mocker: MockerFixture, app_fixture: Fast
mock.assert_called_once_with(
ANY, ANY, test_lei, ["1", SblTypeAssociationDto(id="2"), SblTypeAssociationDto(id="13", details="test")]
)

def test_update_non_existing_institution_types(self, mocker: MockerFixture, app_fixture: FastAPI, authed_user_mock: Mock):

def test_update_non_existing_institution_types(
self, mocker: MockerFixture, app_fixture: FastAPI, authed_user_mock: Mock
):
get_institution_mock = mocker.patch("entities.repos.institutions_repo.get_institution")
get_institution_mock.return_value = None
client = TestClient(app_fixture)
Expand Down

0 comments on commit e250c23

Please sign in to comment.