mirror of
https://github.com/ansible/awx.git
synced 2024-11-02 01:21:21 +03:00
fix notification unit test mock
This commit is contained in:
parent
fb7be12110
commit
9f40e7ef70
@ -34,7 +34,7 @@ def test_send_notifications_list(mocker):
|
||||
mock_job = mocker.MagicMock(spec=UnifiedJob)
|
||||
patches.append(mocker.patch('awx.main.models.UnifiedJob.objects.get', return_value=mock_job))
|
||||
|
||||
mock_notification = mocker.MagicMock(spec=Notification, subject="test")
|
||||
mock_notification = mocker.MagicMock(spec=Notification, subject="test", body={ 'hello': 'world' })
|
||||
patches.append(mocker.patch('awx.main.models.Notification.objects.get', return_value=mock_notification))
|
||||
|
||||
with apply_patches(patches):
|
||||
|
Loading…
Reference in New Issue
Block a user