-
Notifications
You must be signed in to change notification settings - Fork 130
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
Unit tests for new_student view #79
Comments
@garg3133 Can I work on this issue. Please assign this issue to me. |
Sure @Vrindagupta6828! |
@garg3133 Can you please tell me how to run the test written as when i am executing the statement manage.py test students it is showing the following error: |
Try to run Also, add an empty |
I did all that but when i am running this it is showing ran 0 test |
It should show ran 1 test |
Have you deleted the You may also add a |
I have deleted the file and create a folder named tests and in that have made a file test_views.py |
@garg3133 Can you please assist me how to advance further? |
@Vrindagupta6828 Where are you stuck at? You first need to create a class with name that matches function view name like In that class, create a function Then the first few functions will be same as in https://github.com/garg3133/fossee/blob/master/roomslotbooking/home/tests/test_views.py IndexViewTest which just tests if the user is being redirected properly if the user is not a volunteer, hasn't completed the profile or not authenticated. Then it should test if the correct template is being shown to the user. Then just the basic working of the Everything is explained in great details in this tutorial: https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django/Testing Testing is a very major part of any software and hence should be done properly. You can watch this video to get an essence of why we actually do testing: https://www.youtube.com/watch?v=1Lfv5tUGsn8 |
@garg3133 please assign this to me under GSSOC'21 |
Sure @anurag0singh! |
Hello @anurag0singh, you have been unassigned from this issue because you have not updated this issue or any referenced pull requests for over 14 days. Thanks for your contributions, and hope to see you again soon! |
Is the issue still alive to add code, I am interested in adding the unit-tests |
Yes, you can work on it. |
@harshakhmk I am assigning you this issue |
Do I need to add test views in all apps |
Hello @harshakhmk, you claimed this issue to work on it, but this issue and any referenced pull requests haven't been updated for 10 days. Are you still working on this issue? If so, please update this issue by leaving a comment on this issue to let me know that you're still working on it. Otherwise, I'll automatically remove you from this issue in 4 days. If you've decided to work on something else, simply unassign yourself from this issue by going to the Thank you for your valuable contributions to JagratiWebApp! |
I am working on it @Jagrati-Bot |
No, you just need to add the tests in the |
@Jagrati-Bot review pending |
Hello @harshakhmk, you claimed this issue to work on it, but this issue and any referenced pull requests haven't been updated for 10 days. Are you still working on this issue? If so, please update this issue by leaving a comment on this issue to let me know that you're still working on it. Otherwise, I'll automatically remove you from this issue in 4 days. If you've decided to work on something else, simply unassign yourself from this issue by going to the Thank you for your valuable contributions to JagratiWebApp! |
I am sorry, I was not able to work @priyansh3133 you guided me well with the workflow, but it failed on my local system and I was not clear with flow of user signup process, unassign me this issue |
@garg3133 is this issue open? if so pls assign me, i have never worked with unit tests i want to give it a try |
Hello @akshay399, you claimed this issue to work on it, but this issue and any referenced pull requests haven't been updated for 10 days. Are you still working on this issue? If so, please update this issue by leaving a comment on this issue to let me know that you're still working on it. Otherwise, I'll automatically remove you from this issue in 4 days. If you've decided to work on something else, simply unassign yourself from this issue by going to the Thank you for your valuable contributions to JagratiWebApp! |
Hello @akshay399, you have been unassigned from this issue because you have not updated this issue or any referenced pull requests for over 14 days. Thanks for your contributions, and hope to see you again soon! |
Write unit tests for
new_student
view in thestudents
app. The tests need to be added in a filetest_views
intest
directory ofstudents
app.To learn about how to write unit tests in Django, you may follow this tutorial from MDN: https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django/Testing
For any further doubts and queries, feel free to join the community and ask there: https://discord.gg/Ek9q45ZjAv
The text was updated successfully, but these errors were encountered: