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

Assert redirects #79

Merged
merged 12 commits into from
Sep 19, 2024
Merged

Assert redirects #79

merged 12 commits into from
Sep 19, 2024

Conversation

dalonsoa
Copy link
Collaborator

Description

Adds base test classes - and then actual test classes - to assert the page redirection when visiting views that require authentication.

Fixes #69

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)
  • 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. python -m sphinx -b html docs docs/build)
  • 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))

@dalonsoa dalonsoa marked this pull request as ready for review September 17, 2024 10:58
Copy link
Contributor

@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 seems sensible and I like it! I haven't gone through it in details yet though. So I'll leave it for someone else to official approve

Copy link
Contributor

@cc-a cc-a left a comment

Choose a reason for hiding this comment

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

Looks nice. Thanks for expanding out test coverage. I've suggested a few minor simplifications.

tests/test_views.py Outdated Show resolved Hide resolved
tests/test_views.py Outdated Show resolved Hide resolved
@dalonsoa
Copy link
Collaborator Author

All good!

@alexdewar alexdewar mentioned this pull request Sep 19, 2024
@codecov-commenter
Copy link

codecov-commenter commented Sep 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (3ad7ce8) to head (ddffaa7).

Additional details and impacted files
@@             Coverage Diff              @@
##             main       #79       +/-   ##
============================================
+ Coverage   82.00%   100.00%   +18.00%     
============================================
  Files           6         5        -1     
  Lines          50        41        -9     
============================================
  Hits           41        41               
+ Misses          9         0        -9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dalonsoa
Copy link
Collaborator Author

100% coverage!!! 🎉 🎉

@dalonsoa dalonsoa merged commit 169648f into main Sep 19, 2024
4 checks passed
@dalonsoa dalonsoa deleted the assert_redirects branch September 19, 2024 14:14
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.

Assert login redirect fixture
4 participants