Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase coverage. #483

Closed
terjekv opened this issue Mar 17, 2023 · 0 comments · Fixed by #484
Closed

Increase coverage. #483

terjekv opened this issue Mar 17, 2023 · 0 comments · Fixed by #484
Assignees

Comments

@terjekv
Copy link
Collaborator

terjekv commented Mar 17, 2023

There is some low-hanging fruit in the coverage space, and some not-so-low-hanging stuff. Either way, it could do with a cleanup.

@terjekv terjekv self-assigned this Mar 17, 2023
terjekv added a commit to terjekv/mreg that referenced this issue Mar 17, 2023
Fixes unioslo#483

First pass:
  - Add pragma to exempt lines from coverage to .coveragerc
  - Add test for stringifying HostPolicyComponent-based objects (see unioslo#482)
  - Mock host_permissions/user_in_required_groups as its not supported by default.
  - Ensure that IsSuperOrAdminOrReadOnly is tested for unauthenticated users (test_permissions/test_get_at_different_privilege_levels)
  - Exclude exceptions from coverage that are impossible to reach without creating a broken API.
  - Test that IsSuperOrNetworkAdminMember returns 401 for unauthenticated users (test_networks/test_networks_get_401_unauthorized).
terjekv added a commit to terjekv/mreg that referenced this issue Mar 29, 2023
Fixes unioslo#483

First pass:
  - Add pragma to exempt lines from coverage to .coveragerc
  - Add test for stringifying HostPolicyComponent-based objects (see unioslo#482)
  - Mock host_permissions/user_in_required_groups as its not supported by default.
  - Ensure that IsSuperOrAdminOrReadOnly is tested for unauthenticated users (test_permissions/test_get_at_different_privilege_levels)
  - Exclude exceptions from coverage that are impossible to reach without creating a broken API.
  - Test that IsSuperOrNetworkAdminMember returns 401 for unauthenticated users (test_networks/test_networks_get_401_unauthorized).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant