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

feature/141-tests-for-volunteer #145

Merged
merged 24 commits into from
Apr 24, 2024
Merged

Conversation

MRomalde
Copy link
Contributor

@MRomalde MRomalde commented Apr 3, 2024

Added test for volunteer modelviewset.

To probe it just have to use the command: python manage.py test

@MRomalde MRomalde self-assigned this Apr 3, 2024
@MRomalde MRomalde added the enhancement New feature or request label Apr 3, 2024
@MRomalde MRomalde added this to the Sprint 3 milestone Apr 3, 2024
@MRomalde MRomalde linked an issue Apr 3, 2024 that may be closed by this pull request
Copy link
Contributor

@auroranavas auroranavas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems to me that you are testing admin permissions and not volunteer ones. To test the volunteer actor you should test the following:

  • Register as a volunteer, first create a User instance, then a Volunteer one, and finally link that volunteer to the user via the FK in user. Delete and edit your own profile.
  • Sign up for events.
  • Sign up for classes.

You should also test that as a volunteer you cannot do certain things. For example, edit a class.

Tip: read requirements document for inspiration.

@MRomalde
Copy link
Contributor Author

MRomalde commented Apr 5, 2024

Create the unit tests for the main features of the volunteer user. Also, check that all the validations are correct, and the user can write where is supposed to write, and cannot where is not.

This is the task i have done, the main features of a volunteer are the CRUD, so for the test of the main features, we need to test the CRUD operations of volunteer, that is what i have done

@auroranavas
Copy link
Contributor

Check our TL's message in Discord.

Copy link
Contributor

@auroranavas auroranavas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is much much better :) and I can tell you put effort into this. You test all the functionalities a Volunteer user can do on our platform. However, I have a few requests.

nexong/api/Lesson/views.py Outdated Show resolved Hide resolved
nexong/api/Authentication/tests.py Outdated Show resolved Hide resolved
nexong/api/Authentication/tests.py Outdated Show resolved Hide resolved
nexong/api/Event/tests.py Outdated Show resolved Hide resolved
nexong/api/Event/tests.py Outdated Show resolved Hide resolved
nexong/api/Event/tests.py Outdated Show resolved Hide resolved
nexong/api/Lesson/tests.py Outdated Show resolved Hide resolved
Copy link
Contributor

@manortbla manortbla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should check aurora's feedback.

@MRomalde
Copy link
Contributor Author

My bad did not see the feedback. I will do it today thanks.

Copy link
Contributor

@auroranavas auroranavas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests are well done now 👍. But I have a question about the change you made in eventSerializer.py.

nexong/api/Event/eventSerializer.py Show resolved Hide resolved
@auroranavas auroranavas self-requested a review April 24, 2024 12:25
Copy link
Contributor

@auroranavas auroranavas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your response!

@MRomalde MRomalde merged commit 2976488 into develop Apr 24, 2024
6 checks passed
@MRomalde MRomalde deleted the feature/141-tests-for-volunteer branch April 24, 2024 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tests for volunteer
3 participants