Skip to content

Commit

Permalink
Add tests to assets list and asset
Browse files Browse the repository at this point in the history
  • Loading branch information
patryk-dabrowski committed May 17, 2024
1 parent 50564d8 commit cb4a562
Show file tree
Hide file tree
Showing 5 changed files with 13,294 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/hct_mis_api/apps/core/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ def resolve_asset(business_area_slug: str, uid: str) -> Dict:
except ObjectDoesNotExist as e:
logger.exception(f"Provided business area: {business_area_slug}, does not exist.")
raise GraphQLError("Provided business area does not exist.") from e
except AttributeError as error:
except AttributeError as error: # pragma: no cover
logger.exception(error)
raise GraphQLError(str(error)) from error

Expand All @@ -309,7 +309,7 @@ def resolve_assets_list(business_area_slug: str, only_deployed: bool = False) ->
except ObjectDoesNotExist as e:
logger.exception(f"Provided business area: {business_area_slug}, does not exist.")
raise GraphQLError("Provided business area does not exist.") from e
except AttributeError as error:
except AttributeError as error: # pragma: no cover
logger.exception(error)
raise GraphQLError(str(error)) from error
except CountryCodeNotProvided:
Expand Down
Loading

0 comments on commit cb4a562

Please sign in to comment.