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

Write additional test for gardens query #40

Open
capndave opened this issue Oct 5, 2020 · 2 comments
Open

Write additional test for gardens query #40

capndave opened this issue Oct 5, 2020 · 2 comments
Assignees
Labels
enhancement New feature or request Hacktoberfest Work on this for Hacktoberfest!

Comments

@capndave
Copy link
Collaborator

capndave commented Oct 5, 2020

Type

Feature request

Problem or To-Do

In gardens/tests.py, both test_gardens_query and test_incorrect_gardens_query_throws_error pass because calling the query throws an error, because the default user associated with the query is anonymous (and is not is_staff or is_superuser. Please mock a client or response that has a superuser or staff user as the requester, and pass it in as context so that the query will not throw an error.

Additional Information

Please see here and here

@capndave capndave added enhancement New feature or request Hacktoberfest Work on this for Hacktoberfest! labels Oct 5, 2020
@ZayX0
Copy link

ZayX0 commented Oct 6, 2020

I can give this a shot, just to clarify this issue is looking to update both those tests with a superuser context so that they don't throw an error?

@capndave
Copy link
Collaborator Author

capndave commented Oct 6, 2020

Please just make one additional test, very similar to the first, then add superuser context to it so it doesn't throw an error. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Hacktoberfest Work on this for Hacktoberfest!
Projects
None yet
Development

No branches or pull requests

2 participants