Skip to content

Conversation

@komaleswarreddy
Copy link

This PR improves test clarity for Issue #256 by documenting the expected database queries triggered by the IsOrganizationManager permission check using assertNumQueries.

No application behavior is changed; this makes the security-related query cost explicit and helps prevent future confusion or accidental regressions.

Add assertNumQueries to the organization manager permission test
to document the expected database queries triggered by permission
and object-level access checks.

These queries are intentional and required for security and
multi-tenancy, and documenting them helps prevent confusion
and accidental regressions.

Fixes openwisp#256
Add assertNumQueries to the organization manager permission test
to document the expected database queries triggered by permission
and object-level access checks.

These queries are intentional and required for security and
multi-tenancy, and documenting them helps prevent confusion
and accidental regressions.

Fixes openwisp#256
Add assertNumQueries to the organization manager permission test
to document the expected database queries triggered by permission
and object-level access checks.

These queries are intentional and required for security and
multi-tenancy, and documenting them helps prevent confusion
and accidental regressions.

Fixes openwisp#256
Add assertNumQueries to the organization manager permission test
to document the expected database queries triggered by permission
and object-level access checks.

These queries are intentional and required for security and
multi-tenancy, and documenting them helps prevent confusion
and accidental regressions.

Fixes openwisp#256

Please enter the commit message for your changes. Lines starting
@coveralls
Copy link

Coverage Status

coverage: 97.891%. remained the same
when pulling a88299e on komaleswarreddy:tests/api-query-clarity
into 447037c on openwisp:master.

Copy link
Member

@nemesifier nemesifier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR looks spam. I don't understand what's the point of this.

response = self.client.get(self.owner_url, **auth)
self.assertEqual(response.status_code, 403)

def test_operator_member(self):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you removing this test?

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 this pull request may close these issues.

4 participants