Skip to content

Testing | Sample exception + permission | Check response headers and problem code #4

@shivanshs9

Description

@shivanshs9

Code a sample view which uses permissions derived from BaseProblemPermission class and throws a registered exception. Write tests with this view to test the following behaviors:

  • When the permission passes, content type is "application/json".
  • When the permission fails, content type is "application/problem+json" and the problem code is the same as the one declared in the registered exception with the permission.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions