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

Stringify in HostPolicyComponent returns quoted string. #482

Open
terjekv opened this issue Mar 17, 2023 · 0 comments
Open

Stringify in HostPolicyComponent returns quoted string. #482

terjekv opened this issue Mar 17, 2023 · 0 comments

Comments

@terjekv
Copy link
Collaborator

terjekv commented Mar 17, 2023

https://github.com/unioslo/mreg/blob/master/hostpolicy/models.py#L20 ensures that an object of a class inheriting from HostPolicyComponent with name test will be returned as "test". It should be verified that this is expected and required.

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

No branches or pull requests

1 participant