gardenbuilder-app / gardenbuilder-app/gardenbuilder-backend-python

Write additional test for gardens query

Open
#40 2 comments 0 reactions 1 assignee Claimed by @ZayX0 View on GitHub
enhancement Hacktoberfest
Dominant language
JavaScript
Stars
6
Forks
11
PR merge metrics
No merged PRs in 30d

Description

## 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](https://docs.graphene-python.org/en/latest/testing/) and [here](https://github.com/graphql-python/graphene/issues/591)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.