Skip to content

Commit

Permalink
[tests] Updated mock reference to openwisp-notifications celery tasks
Browse files Browse the repository at this point in the history
The celery task update_superuser_notification_settings
in openwisp-notifications, which was referenced in
the sample_users app in the test project, was removed
in openwisp-notifications, hence the test code had
to be updated accordingly.
  • Loading branch information
nemesifier committed Jan 27, 2025
1 parent d3c9d31 commit a4c7df7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/openwisp2/sample_users/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ class TestMultitenantAdmin(BaseTestMultitenantAdmin):
class TestUsers(BaseTestUsers):
# This task access the organizations_dict when user is created.
# This makes the test fail because the cache is already populated.
@patch('openwisp_notifications.tasks.update_superuser_notification_settings')
@patch('openwisp_notifications.tasks.create_superuser_notification_settings')
@patch('openwisp_notifications.tasks.superuser_demoted_notification_setting')
def test_organizations_dict_cache(self, *args):
super().test_organizations_dict_cache()

Expand Down

0 comments on commit a4c7df7

Please sign in to comment.