1
0
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:
Chris Meyers 2016-11-14 16:29:20 -05:00
parent fb7be12110
commit 9f40e7ef70

View File

@ -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):