@mock.patch('request_shoutout.adapters.db.orm.DjangoTalentProfit.persist', side_effect=Exception())
def test_rollback_when_fulfilling_a_shoutout_request_fails(self, mock1, mock2):
    response = self.client.post(reverse('request_shoutout:fulfill'), self.request_data, format='multipart')
    self.assertEqual(response.status_code, status.HTTP_500_INTERNAL_SERVER_ERROR)
    self.assertEqual(response.data, {'error': 'It happened an issue when persisting shoutout video'})
    self.assertEqual(TalentProfit.objects.count(), 0)
    self.assertEqual(ShoutoutVideo.objects.count(), 0)
@mock.patch('request_shoutout.adapters.db.orm.DjangoTalentProfit.persist', side_effect=Exception())
def test_rollback_when_fulfilling_a_shoutout_request_fails(self, mock1, mock2):
    response = self.client.post(reverse('request_shoutout:fulfill'), self.request_data, format='multipart')
    self.assertEqual(response.status_code, status.HTTP_500_INTERNAL_SERVER_ERROR)
    self.assertEqual(response.data, {'error': 'It happened an issue when persisting shoutout video'})
    self.assertEqual(TalentProfit.objects.count(), 0)
    self.assertEqual(ShoutoutVideo.objects.count(), 0)