Skip to content

Comments

543 adding missing tests#607

Open
Sahil590 wants to merge 3 commits intomainfrom
543-test-views
Open

543 adding missing tests#607
Sahil590 wants to merge 3 commits intomainfrom
543-test-views

Conversation

@Sahil590
Copy link

@Sahil590 Sahil590 commented Feb 23, 2026

Description

Added tests for the following views.

  • skill levels page
  • training page
  • get involved page
  • events page
  • account overview page
  • competencies page

Fixes #543

Type of change

  • Documentation (non-breaking change that adds or improves the documentation)
  • New feature (non-breaking change which adds functionality)
  • Optimization (non-breaking, back-end change that speeds up the code)
  • Technical work (non-breaking, change which is work as part of a new feature)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (whatever its nature)

Key checklist

  • All tests pass (eg. python -m pytest)
  • The documentation builds and looks OK (eg. mkdocs serve)
  • Pre-commit hooks run successfully (eg. pre-commit run --all-files)

Further checks

  • Code is commented, particularly in hard-to-understand areas
  • Tests added or an issue has been opened to tackle that in the future. (Indicate issue here: # (issue))

@Sahil590 Sahil590 marked this pull request as ready for review February 23, 2026 16:59
Copy link
Collaborator

@AdrianDAlessandro AdrianDAlessandro 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 great, can you add a test_provides_required_context type of test for the index view? I think that then covers all the missing ones.

It might even be worth making a mixin class for that test, because it seems relatively standard. but if they differ enough to make it tricky then don't bother


from django.urls import reverse

from main.models import Competency, CompetencyDomain, Skill, SkillLevel, UserSkill
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is currently imported inside one of the pre-existing tests. It's probably best to keep it here, can you delete it from the other one?

@codecov
Copy link

codecov bot commented Feb 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add tests for untested views

2 participants