Skip to content

Commit a4c7df7

Browse files
committed
[tests] Updated mock reference to openwisp-notifications celery tasks
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.
1 parent d3c9d31 commit a4c7df7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: tests/openwisp2/sample_users/tests.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ class TestMultitenantAdmin(BaseTestMultitenantAdmin):
3434
class TestUsers(BaseTestUsers):
3535
# This task access the organizations_dict when user is created.
3636
# This makes the test fail because the cache is already populated.
37-
@patch('openwisp_notifications.tasks.update_superuser_notification_settings')
37+
@patch('openwisp_notifications.tasks.create_superuser_notification_settings')
38+
@patch('openwisp_notifications.tasks.superuser_demoted_notification_setting')
3839
def test_organizations_dict_cache(self, *args):
3940
super().test_organizations_dict_cache()
4041

0 commit comments

Comments
 (0)