Skip to content

Conversation

@wmaciejewskimer
Copy link
Collaborator

No description provided.

Copy link

@pbaranskimrx pbaranskimrx left a 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:

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?


@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")

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?

- mfa methods enum
- DRY
@codecov
Copy link

codecov bot commented May 24, 2022

Codecov Report

Merging #161 (e25e75f) into develop (ac2e9f9) will increase coverage by 0.17%.
The diff coverage is 96.00%.

Impacted file tree graph

@@             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     
Impacted Files Coverage Δ
trench/backends/twilio.py 93.75% <93.33%> (-0.70%) ⬇️
trench/settings.py 98.14% <100.00%> (+0.42%) ⬆️
trench/views/base.py 95.23% <0.00%> (+1.36%) ⬆️

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.

3 participants