Skip to content

fix regression from PR #500#558

Merged
claudep merged 1 commit intojazzband:masterfrom
PetrDlouhy:fix_500_regression
Nov 12, 2022
Merged

fix regression from PR #500#558
claudep merged 1 commit intojazzband:masterfrom
PetrDlouhy:fix_500_regression

Conversation

@PetrDlouhy
Copy link
Contributor

Fix regression introduced in #500.

Description

All the changes of test_view_login.py were wrong and they are reverted.
We are now detecting if OTPRequiredMixin is used for next URL and only then we redirect to OTP setup page.
The newly introduced test in OTPRequiredMixinTest is not changed and passes.

Motivation and Context

Fix regression described in #499

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@PetrDlouhy
Copy link
Contributor Author

I see, that now it doesn't count with non-class based views. I must fix that.

@PetrDlouhy
Copy link
Contributor Author

I added fix for non-class based views with test.

@claudep
Copy link
Contributor

claudep commented Oct 29, 2022

Hi @PetrDlouhy, could you please fix the flake8 failure?

@codecov
Copy link

codecov bot commented Nov 12, 2022

Codecov Report

Merging #558 (988e2ec) into master (0c31bbf) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #558      +/-   ##
==========================================
- Coverage   95.67%   95.66%   -0.02%     
==========================================
  Files          65       65              
  Lines        2938     2952      +14     
  Branches      329      331       +2     
==========================================
+ Hits         2811     2824      +13     
  Misses        103      103              
- Partials       24       25       +1     
Impacted Files Coverage Δ
tests/test_views_login.py 100.00% <100.00%> (ø)
two_factor/views/core.py 96.61% <100.00%> (-0.22%) ⬇️
two_factor/views/mixins.py 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@claudep claudep left a comment

Choose a reason for hiding this comment

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

Thanks!

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.

2 participants

Comments