vault19 / django-courses

Simple Django to manage courses
MIT License
6 stars 5 forks source link

Add unit tests to check pages wheather user is logged in #29

Open ricco386 opened 3 years ago

ricco386 commented 3 years ago

How to write and run tests is described in README.rst: https://github.com/vault19/django-courses#testing contributing.rst: https://github.com/vault19/django-courses/blob/main/contributing.rst#testing-setup

Write unit test that will check all the views in views.py. For pages that doesnt require login just check that they return correct response code, for both logged in user and also not logged in user.

Make sure that views that are decorated with @login_required will not allow user that is not logged in and allow only logged in users.

BodaleDenis commented 3 years ago

Hi, I'm new to contributing and I like this proposal so I would like to help if it's OK. I think I should be assigned to it ? 😁

biswain2309 commented 3 years ago

Hey! I would like to contribute to the issue.

ricco386 commented 3 years ago

Thanks @BodaleDenis I have assigned the story to you, since you were first. I have updated the contributing file with tests section: https://github.com/vault19/django-courses/blob/main/contributing.rst#testing-setup it is short but if you have question or comments feel free to discuss here or add update to the file as a PR.

ricco386 commented 3 years ago

@biswain2309 thanks for your interest, if you are still interested I have create another issue regards testing: #33 that is suitable for beginners. I will keep adding more issues, if you are interested. Help is always welcome.