Skip to content

Commit 8cc5fd5

Browse files
committed
fix: failing tests
1 parent 266c4b7 commit 8cc5fd5

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

config.py.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ ADMINS = [
9797
SMTP_SERVER = "metabrainz-mail"
9898
SMTP_PORT = 25
9999
MAIL_FROM_DOMAIN = "metabrainz.org"
100+
MB_MAIL_SERVER_URI = "http://localhost:3000"
100101

101102
# OTHER STUFF
102103

metabrainz/notifications/views_test.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,8 @@ def test_remove_notifications(self, mock_requests, mock_delete):
167167

168168
@requests_mock.Mocker()
169169
@mock.patch('metabrainz.notifications.views.insert_notifications')
170-
def test_send_notifications(self, mock_requests, mock_insert):
170+
@mock.patch('metabrainz.mail.NotificationSender.send_immediate_notifications')
171+
def test_send_notifications(self, mock_requests, mock_insert, mock_mail):
171172
test_data = [
172173
{ "id": 102,
173174
"user_id": 1,
@@ -196,7 +197,7 @@ def test_send_notifications(self, mock_requests, mock_insert):
196197
"send_email": True
197198
}
198199
]
199-
200+
mock_mail.return_value = None
200201
mock_insert.return_value= test_data
201202
mock_requests.post(self.introspect_url, json={
202203
"active": True,

0 commit comments

Comments
 (0)