PythonBulawayo / ChitChat

23 stars 25 forks source link

Create test for the API Root View #42

Open terrameijar opened 8 months ago

terrameijar commented 8 months ago

Create a unit test for the APIRootView in backend/api/views. The test should test that the view exists by checking that navigating to the view returns an HTTP status code of 200.

Going over the section on testing in the docs is a good idea:

https://docs.djangoproject.com/en/5.0/topics/testing/

Awakhiwekyle commented 8 months ago

Thanks @terrameijar, I am happy to start working on this today. If anything, I will be asking for help and clarification as we go.

terrameijar commented 8 months ago

Thanks @terrameijar, I am happy to start working on this today. If anything, I will be asking for help and clarification as we go.

Happy to help. Note that we're using Python's unittest module here and not pytest so some things might be different from what you're used to.