Skip to content

Commit

Permalink
Fix tahoe-idp receiver func test mocking
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanlandia committed Jun 28, 2023
1 parent 131b012 commit b8b12b1
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def deactivate_user(self, color, username=None):
@patch('tahoe_idp.api.deactivate_user')
@patch.dict('django.conf.settings.FEATURES', {'ENABLE_TAHOE_IDP': True})
def test_disallow_email_reuse_after_deactivate(
self, mock_deactivate_user, mock_get_tahoe_idp_id_by_user, mock_receivers_is_idp_enabled
self, mock_deactivate_user, mock_get_tahoe_idp_id_by_user
):
"""
Test the account deletion with Tahoe IdP support.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def test_successful_email_change_without_idp(self, mock_update_user_email):

@patch('tahoe_idp.receivers.helpers.is_tahoe_idp_enabled', new=patches.dummy_receivers_idp_not_enabled)
@patch('tahoe_idp.api.update_user_email')
def test_successful_email_change_with_idp(self, mock_update_user_email, mock_receivers_is_idp_enabled):
def test_successful_email_change_with_idp(self, mock_update_user_email):
"""
Test `confirm_email_change` with ENABLE_TAHOE_IDP = True.
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class TahoeIdpResetPasswordTests(TestCase):
'enable_tahoe_idp': True,
'message': 'Tahoe 2.0 logic: should NOT send email via Open edX, `tahoe_idp` takes care of that',
})
def test_reset_password_with_tahoe_idp(self, mock_request_password_reset, mock_receivers_is_idp_enabled, enable_tahoe_idp, message):
def test_reset_password_with_tahoe_idp(self, mock_request_password_reset, enable_tahoe_idp, message):
"""
Tests Tahoe IdP/non-idp password reset.
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def test_api_without_tahoe_idp(self, url):
reverse_lazy('tahoe-api:v1:registrations-list'),
reverse_lazy('tahoe-api:v2:registrations-list'),
)
def test_api_wit_tahoe_idp(self, mock_receivers_is_idp_enabled, url):
def test_api_wit_tahoe_idp(self, url):
"""
Both v1 and v2 API shouldn't work with Tahoe IdP.
"""
Expand Down

0 comments on commit b8b12b1

Please sign in to comment.