-
Notifications
You must be signed in to change notification settings - Fork 60
Add twilio call backend #161
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
base: develop
Are you sure you want to change the base?
Conversation
pbaranskimrx
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice 👏 Only a few comments regarding code quality
|
|
||
|
|
||
| @pytest.fixture() | ||
| def active_user_with_twilio_call_otp() -> UserModel: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code inside this function and here: active_user_with_twilio_sms_otp are the same instead of method_name. maybe extracting it to another function will avoid DRY?
testproject/tests/test_backends.py
Outdated
|
|
||
| @pytest.mark.django_db | ||
| def test_twilio_call_backend_without_credentials(active_user_with_twilio_call_otp, settings): | ||
| auth_method = active_user_with_twilio_call_otp.mfa_methods.get(name="call_twilio") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about storing mfa_methods in Enum class?
Codecov Report
@@ Coverage Diff @@
## develop #161 +/- ##
===========================================
+ Coverage 97.72% 97.89% +0.17%
===========================================
Files 40 40
Lines 878 902 +24
===========================================
+ Hits 858 883 +25
+ Misses 20 19 -1
|
No description provided.