Skip to content

Full (and Direct) Test Coverage for the Permissions Library Module #543

@bencap

Description

@bencap

We use a library module permissions.py to manage the permission boundaries of certain objects. Generally, the function assert_permission is called by methods in router files to check if users have permission to view/edit/delete/etc. objects. This module isn't really tested directly, but instead is tested indirectly via each router module. These are rather verbose and a bit of a roundabout way of testing the permissions module is working as intended (with that said, we should probably retain the router tests to ensure the permission module is being called as appropriate). For a module as important as permissions, we should have dedicated tests.

We should:

  • Add tests for lib/permissions.py`
  • Ensure full coverage of the permissions file

Metadata

Metadata

Assignees

Labels

app: backendTask implementation touches the backendtype: maintenanceMaintaining this projecttype: testsTests for this project

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions